1
我试图使用我的光盘上的知识(经纬度)MySQL
数据库记录从foursquare中导出类别。PHP Foursquare API返回Null到场馆/搜索
当我向foursquare请求时,我只收到NULL,而不是预期的数据。
按照代码:
$id = $_SESSION["id"];
$total = $resultA["place"];
$lat = addslashes($resultA["place_lat"]);
$lng = addslashes($resultA["place_lng"]);
$name = addslashes($resultA["place_name"]);
$client_key = 'client_id';
$client_secret = 'client_secret';
$curlhandle = curl_init();
curl_setopt($curlhandle, CURLOPT_URL, "https://api.foursquare.com/v2/venues/search
?client_id=client_id
&client_secret=client_secret
&v=20141006
&ll=$lat,$lng");
curl_setopt($curlhandle, CURLOPT_RETURNTRANSFER, 1);
**$response = curl_exec($curlhandle)**;
curl_close($curlhandle);
$venues = json_decode($response);
除了这个问题,当我跑我的broswer代码中,我有问题:“致命错误:用C超过最长30秒的执行时间:\ XAMPP \ htdocs中\ tcc \ recomendacao \ analisarUser.php on line **$response = curl_exec($curlhandle)**
“
有人知道会发生什么情况吗?非常感谢。
Mubo, 展位限制有助于延长出场时间,但致命错误仍然存在。 对我来说最陌生的是,如果我对代码进行修饰,变量$ response总是0,所以这不是我所期待的。 请问你能再帮忙吗? – 2014-10-07 23:47:51