V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  wontao  ›  全部回复第 1 页 / 共 1 页
回复总数  1
2013-10-19 00:21:45 +08:00
回复了 jeequ 创建的主题 程序员 PHP 获取优酷视频缩略图,视频播放时长
function get_youku_thumb($url) {
$content = file_get_contents($url);
preg_match( '/id="s_msn2".*?screenshot=(.*?)".?target=/', $content, $matchs );
return $matchs[1];
}
echo get_youku_thumb('http://v.youku.com/v_show/id_XMjkwMjg5MDQw.html');
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1190 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 10ms · UTC 17:48 · PVG 01:48 · LAX 10:48 · JFK 13:48
Developed with CodeLauncher
♥ Do have faith in what you're doing.