我我的本地机器上进行投入是
Array ([stream_h264_sd_url] => http://www.dailymotion.com/cdn/H264-320x240/video/xt27x1.mp4?auth=1409329979-2562-powad7sw-c7d26f9df92ba4975d710020e793bd6d [stream_h264_hq_url] => [stream_h264_url] => http://www.dailymotion.com/cdn/H264-512x384/video/xt27x1.mp4?auth=1409329979-2562-s4iclgxy-6f7a4eed9658bc22bf4551c3991bb400 [stream_h264_hd_url] =>)
确保您的卷曲和PHP是最新上运行代码
也请注意,我改变$会话$ _SESSION是一个全球性的并且还可能导致问题
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"http://www.dailymotion.com/json/video/xt27x1?fields=stream_h264_sd_url,stream_h264_hq_url,stream_h264_url,stream_h264_hd_url");
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071025 Firefox/2.0.0.9');
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$content = curl_exec($ch);
curl_close($ch);
print_r(json_decode($content,true));
复制你的代码到这里似乎工作:http://www.compileonline.com/execute_php_online.php难道说可以快速连续多次请求的意思是请求IGN因为我得到了一些警告。 – 2014-08-27 16:24:16
嗨,我只是更新我的文章,可以看到新的代码。谢谢。 – OPUS 2014-08-27 18:57:10