Skip to content
This repository has been archived by the owner on May 28, 2024. It is now read-only.

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
k3nsei committed Mar 22, 2014
1 parent 8710ced commit f7381cd
Showing 1 changed file with 23 additions and 3 deletions.
26 changes: 23 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,28 @@ try {
```php
<?php

require_once 'peopleParser.php';
$pareser = new MLNG\MAL\People\Parser($html);
use MLNG\MAL\People\Parser as PeopleParser;

?>
// Turn off all error reporting
error_reporting(0);
// Report all PHP errors
//error_reporting(E_ALL);

date_default_timezone_set('Europe/Warsaw');

require_once './peopleParser.php';

$id = 1;

$response = shell_exec("casperjs mal.casper.js \"http://myanimelist.net/people/" . $id . "\" 2>&1 &");
$response = trim($response);

try {
$parser = new PeopleParser($response);
$data = $parser->getAll();

var_dump($data);
} catch (Exception $e) {
echo 'no_found ' . $id;
}
```

0 comments on commit f7381cd

Please sign in to comment.