PhpQuery:我如何使用getJSON?

时间:2012-01-19 09:48:39

标签: php phpquery

我想使用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));

?>

0 个答案:

没有答案