From f7381cd33641dc913ad61a83e2618682c7d779d3 Mon Sep 17 00:00:00 2001 From: k3nsei Date: Sat, 22 Mar 2014 16:22:23 +0100 Subject: [PATCH] Update README.md --- README.md | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 26d2eef..3d1263a 100644 --- a/README.md +++ b/README.md @@ -34,8 +34,28 @@ try { ```php +// 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; +} ```