A PHP crawler module to get tibia.com parsed data.
- Download Composer or update
composer self-update
. - Run
php composer.phar require tibiasolutions/tibia-parser
If Composer is installed globally, run
composer require tibiasolutions/tibia-parser
require dirname(__DIR__) . '/vendor/autoload.php';
use TibiaParser\Player;
$player = new Player('Kharsek');
if ($player->exists) {
var_dump($player);
} else {
echo 'Character does not exist.';
}
require dirname(__DIR__) . '/vendor/autoload.php';
use TibiaParser\World;
$world = new World('Antica');
if ($world->error != NULL) {
echo $world->error;
} else {
var_dump($world->information);
foreach ($world->players as $player) {
var_dump($player);
}
}
// Get all World Names
var_dump(World::getWorlds());