Oh, I should add that the json_decode() function doesn't exist in PHP 5.1. It's native in 5.2.
You can use PEAR to install the class from here:
http://pear.php.net/package/Services_JSON
And then rig your own json_decode() function like so:
Code:
function json_decode($content, $assoc=false){
require_once '<PATH TO JSON.php>';
if ( $assoc ){
$json = new Services_JSON(SERVICES_JSON_LOOSE_TYPE);
} else {
$json = new Services_JSON;
}
return $json->decode($content);
}