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 14, 2014
1 parent 6a06cc9 commit b4717d1
Showing 1 changed file with 21 additions and 8 deletions.
29 changes: 21 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,30 @@ Example Code of Manga Parser:
```php
<?php

require_once 'mangaParser.php';
use MLNG\MAL\Manga\Parser as MangaParser;

$html = shell_exec("casperjs mal.casper.js \"http://myanimelist.net/manga/11\" 2>&1 &");
$pareser = new MLNG\MAL\Manga\Parser($html);
$data = $parser->getAll();
// Turn off all error reporting
error_reporting(0);
// Report all PHP errors
//error_reporting(E_ALL);

echo "<pre>\n";
var_dump($data);
echo "\n</pre>";
date_default_timezone_set('Europe/Warsaw');

?>
require_once './mangaParser.php';

$id = 1;

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

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

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

Example Code of People Parser:
Expand Down

0 comments on commit b4717d1

Please sign in to comment.