YouTube PHP包装器

问题描述 投票:1回答:2

是否可以使用YouTube的PHP包装程序通过其ID检索视频的分级?

php youtube wrapper
2个回答
1
投票

使用Zend / Google的PHP库。从Zend的Zend_Gdata_YouTube文档中:

<?php
  $yt = new Zend_Gdata_YouTube($httpClient,
                         $applicationId,
                         $clientId,
                         $developerKey);
?>

摘自(也许有据可查)Google site

<?php
  $videoEntry = $yt->getVideoEntry('the0KZLEacs');
  echo 'Rating: ' . $videoEntry->getVideoRatingInfo() . "\n";
?>

0
投票

以下是YouTube提供的示例代码:youtube/api-samples

© www.soinside.com 2019 - 2024. All rights reserved.