2013-05-21 78 views
0

你好我有一個問題,從這個link檢索一個值。 到目前爲止,我一直在使用這一行代碼。解析youtube feed輸出

$str = "https://gdata.youtube.com/feeds/api/videos/VdbUBcOCU_A"; 
$blow =(explode("'",$str)); 

      print_r($blow); 

回聲「陣列」將不勝感激任何幫助如何從鏈接檢索值。謝謝。

+0

什麼編程語言,你使用?你想要什麼? – 2013-05-21 06:54:17

+0

對我來說看起來像PHP。 – MikeLim

回答

0

如果我沒錯,您使用的是PHP嗎?

建議你用在https://developers.google.com/youtube/2.0/developers_guide_php

對於您的情況下谷歌PHP客戶端庫,請參閱https://developers.google.com/youtube/2.0/developers_guide_php#Video_Entry_Contents

$videoEntry = $yt->getVideoEntry('VdbUBcOCU_A'); 
printVideoEntry($videoEntry); 

function printVideoEntry($videoEntry) 
{ 
    echo 'Video: ' . $videoEntry->getVideoTitle() . "\n"; 
    echo 'Video ID: ' . $videoEntry->getVideoId() . "\n"; 
    echo 'Updated: ' . $videoEntry->getUpdated() . "\n"; 
}