能否請你幫我捲曲PHP speakerdeck.com透過oEmbed URL如何捲曲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);
?>
編輯你的問題是好的,但完全改變它意味着人們試圖幫助你需要重新調試一遍。 – user1269942 2014-09-29 17:28:49
試試echo get_data($ url);在底部。 – user1269942 2014-09-29 17:29:43