problems with json and php
<p>I can't understand why is this giving me NULL when i var_dump may i am doing something wrong with referrer part. </p>

<pre><code>    $url = "https://ajax.googleapis.com/ajax/services/feed/find?v=1.0&amp;q=cricket";
    $ref = $_SERVER['HTTP_REFERER'];
    //echo $ref;
    // sendRequest
    // note how referer is set manually
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_REFERER, $ref);
    $body = curl_exec($ch);
    curl_close($ch);

    // now, process the JSON string
    //utf8_encode($body);
    $json = json_decode($body);
    var_dump($json);
</code></pre>
