Guest User

Untitled

a guest
Apr 6th, 2014
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.48 KB | None | 0 0
  1. <?php
  2. require('phpQuery/phpQuery.php');
  3. $html = file_get_contents('http://www.tibia.com/community/?subtopic=characters&name='.$_GET['name']);
  4. $query = phpQuery::newDocument($html);
  5. $guild = $teste['.BoxContent td:contains("membership:")']->next()->text();
  6. $guild = explode(' of the ', $guild);
  7. $output = array(
  8.     'guild' => array(
  9.         'rank' => $guild[0],
  10.         'name' => $guild[1]
  11.     )
  12. );
  13. header('Content-type: application/json');
  14. echo json_encode(array_filter($output), JSON_PRETTY_PRINT);
Advertisement
Add Comment
Please, Sign In to add comment