php获取视频信息,支持多家网站
下面是用法<?php <br />
/**<br>
* 解析 视频信息 类<br>
*<br>
* 支持 优酷, 土豆 酷6 56 新浪 qq播客 乐视 乐视<br>
**/<br>
<br>
<br>
<br>
$all['url'] = 'parse';<br>
$all['youku'] = 'youku';<br>
$all['tudou'] = 'tudou';<br>
$all['ku6'] = 'ku6';<br>
$all['56'] = '_56';<br>
$all['sina'] = 'sina';<br>
$all['qq'] = 'qq';<br>
$all['letv'] = 'letv';<br>
$all['sohu'] = 'sohu';<br>
<br>
$value = empty( $_GET['value'] ) ? '' : (string) $_GET['value'];<br>
$type = empty( $_GET['type'] ) || !is_string( $_GET['type'] ) || empty( $all[$_GET['type']] ) ? 'url' : $_GET['type'];<br>
?><br>
nbsp;html><br>
<br>
<br>
<meta>
<br>
<title>PHP 解析视频信息</title>
<br>
<br>
<br>
<?php <br />
$select = '<select>';<br>
foreach ( $all as $k => $v ) {<br>
$selected = $type == $k ? 'selected="selected"' : '';<br>
$select .= '<option>'. $k .'</option>';<br>
}<br>
$select .= '</select>';<br>
echo '<form>url 或 vid: <input>'. $select .'<input>
</form>';<br>
if ( !$value ) {<br>
die;<br>
}<br>
<br>
$class_video = new class_video;<br>
<br>
echo '<div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:php;toolbar:false">';<br>
echo "\n\n\n";<br>
print_r( call_user_func_array( array( $class_video, $all[$type] ), array( $value ) ) );<br>
echo "\n\n\n";<br>
<br>
?><br>
<br>
</pre><div class="contentsignin">Nach dem Login kopieren</div></div>
来源:http://www.chunci.cn/php-for-video-information-support-multiple-web-sites
video.rar ( 6.29 KB 下载:171 次 )
AD:真正免费,域名+虚机+企业邮箱=0元