您好,我在从此链接中检索值时遇到问题。到目前为止,我一直在使用这行代码。
$str = "https://gdata.youtube.com/feeds/api/videos/VdbUBcOCU_A";
$blow =(explode("'",$str));
print_r($blow);
并回显“数组”将不胜感激如何从链接中检索值。谢谢。
您好,我在从此链接中检索值时遇到问题。到目前为止,我一直在使用这行代码。
$str = "https://gdata.youtube.com/feeds/api/videos/VdbUBcOCU_A";
$blow =(explode("'",$str));
print_r($blow);
并回显“数组”将不胜感激如何从链接中检索值。谢谢。
如果我是正确的,您使用的是 PHP 吗?
建议您在https://developers.google.com/youtube/2.0/developers_guide_php使用 Google 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";
}