trying to get property of non object curl issue
<p>I have a curl setup as follows to access a json object</p>

<p><code>
$ch = curl_init();</p>

<pre><code> curl_setopt($ch, CURLOPT_URL, "http://sitename.com");

 curl_setopt($ch, CURLOPT_HEADER, 0);

 curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

 curl_setopt($ch, CURLOPT_BINARYTRANSFER, true);

 curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookiefilename.txt');


 curl_setopt($ch, CURLOPT_HTTPHEADER, array('Host:sitename.com'));

 $output = curl_exec($ch);

 curl_close($ch);
 $output = json_decode($output);
 echo $output-&gt;property;
</code></pre>

<p></code></p>

<p>I get the error 'trying to access property of non object'. </p>
