我想使用PhpQuery获取JSON数据,但我总是得到一个内部错误:
NetworkError: 500 Internal Server Error
从https://github.com/bluelovers/phpQuery/blob/master/test-cases/test_manual.php提取的测试:
<?php
require_once('phpQuery-onefile.php');
$url =
'http://api.flickr.com/services/feeds/photos_public.gne?tags=cat&tagmode=any&format=json';
phpQuery::ajaxAllowHost('api.flickr.com');
phpQuery::getJSON($url, array('jsoncallback' => '?'), 'jsonSuccess');
var_dump(json_decode($json));
?>