Skip to content

Latest commit

 

History

History
55 lines (42 loc) · 1.23 KB

README.md

File metadata and controls

55 lines (42 loc) · 1.23 KB

Tibia Parser

Total Downloads License

A PHP crawler module to get tibia.com parsed data.

Installation

  1. Download Composer or update composer self-update.
  2. Run
php composer.phar require tibiasolutions/tibia-parser

If Composer is installed globally, run

composer require tibiasolutions/tibia-parser

Basic Usage

Player

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.';
}

World

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());