开发者

PHP class or function to return the URL of the FLV video from a page on YouTube

开发者 https://www.devze.com 2023-01-13 06:57 出处:网络
I want simple PHP class or function to return the URL开发者_JAVA技巧 of the FLV video from a page on YouTube to use this URL in another FLV player to play the video in my own player not with default Y

I want simple PHP class or function to return the URL开发者_JAVA技巧 of the FLV video from a page on YouTube to use this URL in another FLV player to play the video in my own player not with default YouTube player.


There is a CLI program called youtube-dl that does something similar. You pass it an URL and it will download the FLV for you. I'd have a look at the sources (it should be open source) and see how they do it. Python should be fairly easy to translate to php.

Also perhaps you can find their specification faster. I'd start looking at their support page - you'll find a link to the API definition there.


I would be careful with this, and check the youtube TOS first. If you use their bandwidth for videos on your site, and strip out their player, you may find your site suddenly blocked, or you might get a letter from Google's lawyers.

0

精彩评论

暂无评论...
验证码 换一张
取 消