Home > php教程 > php手册 > php获取视频信息,支持多家网站

php获取视频信息,支持多家网站

WBOY
Release: 2016-06-07 11:44:10
Original
1432 people have browsed it

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">';&lt;br&gt; echo &quot;\n\n\n&quot;;&lt;br&gt; print_r( call_user_func_array( array( $class_video, $all[$type] ), array( $value ) ) );&lt;br&gt; echo &quot;\n\n\n&quot;;&lt;br&gt;  &lt;br&gt; ?&gt;&lt;br&gt; &lt;br&gt; </pre><div class="contentsignin">Copy after login</div></div>来源:http://www.chunci.cn/php-for-video-information-support-multiple-web-sites

附件 video.rar ( 6.29 KB 下载:171 次 )

AD:真正免费,域名+虚机+企业邮箱=0元

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template