【发布时间】:2014-09-29 16:27:39
【问题描述】:
你能帮我弄一下 PHP Speakerdeck.com oembed URL
我试过这个,但它返回任何东西。
<?php
$url='https://speakerdeck.com/oembed.json?url=http://www.speakerdeck.com/addyosmani/css-performance-tooling';
function get_data($url){
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.16) Gecko/20110319 Firefox/3.6.16");
$curlData = curl_exec($curl);
curl_close($curl);
return $curlData;
}
get_data($url);
?>
【问题讨论】:
-
编辑你的问题很好,但完全改变它意味着试图帮助你的人需要重新调试它。
-
试试 echo get_data($url);在底部。