2013-05-21 83 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"; 
}