嗨,我想从一个JSON文件中的内容,但我不能,我有许多麻烦做到这一点,我的代码是:问题越来越JSON内容
<?PHP
$url = 'http://www.taringa.net/api/efc6d445985d5c38c5515dfba8b74e74/json/Users-GetUserData/apptastico';
$ch = curl_init();
$timeout = 0; // set to zero for no timeout
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$file_contents = curl_exec($ch); // take out the spaces of curl statement!!
curl_close($ch);
var_dump($file_contents);
?>
如果我把地址在浏览器中我得到的内容没有任何问题,但如果我尝试在PHP或其他代码上获得它,我有问题,我该怎么办?我尝试使用file_get_contents();但我没有得到任何东西,只有问题和问题
定义术语_issues_ – 2011-06-09 05:30:12
您是否收到一些错误? – Ibu 2011-06-09 05:35:03
是的,我得到了:403 - 禁止 – ozonostudio 2011-06-13 18:47:07