kimtd
01-23-2008, 01:08 AM
I tried this using php json_decode function() as well as this package (http://mike.teczno.com/JSON/JSON.phps). Both of them produce NULL. Anyone have any idea as to why?
JSON is here -> http://facebook.dreamhosters.com/tmpjson
PHP code:
<?php
include_once("JSON.php");
$handle = @fopen("http://facebook.dreamhosters.com/tmpjson", "r");
if ($handle) {
$json = new Services_JSON();
while (!feof($handle)) {
$buffer = trim(fgets($handle, 500000));
//$object = json_decode($buffer);
$object = $json->decode($buffer);
var_dump($object);
}
fclose($handle);
}
?>
JSON is here -> http://facebook.dreamhosters.com/tmpjson
PHP code:
<?php
include_once("JSON.php");
$handle = @fopen("http://facebook.dreamhosters.com/tmpjson", "r");
if ($handle) {
$json = new Services_JSON();
while (!feof($handle)) {
$buffer = trim(fgets($handle, 500000));
//$object = json_decode($buffer);
$object = $json->decode($buffer);
var_dump($object);
}
fclose($handle);
}
?>