嗨,在网上搜索,但我找不到解决方案。
我会保存此URL中的数据http://www.google.com/trends/fetchComponent?q=asdf,qwerty&cid=TIMESERIES_GRAPH_0&export=3到PHP数组中。
现在我有这个代码,
<?php
$url = 'http://www.google.com/trends/fetchComponent?q=asdf,qwerty&cid=TIMESERIES_GRAPH_0&export=3';
$c = curl_init($url);
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
$responsedata = curl_exec($c);
curl_close($c);
echo $responsedata;
?>
但似乎不起作用。
有人能帮我吗?
其JSON
remove // Data table response
google.visualization.Query.setResponse
和);
然后http://php.net/json_decode