基于源码仿建视频解析网站
生活随笔
收集整理的這篇文章主要介紹了
基于源码仿建视频解析网站
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
0源碼下載
1仿建網站
1.1網址:video.lnkjdx.com
1.2效果圖
1.3使用方法
將視頻的鏈接地址或視頻所在網頁粘貼解析播放即可
2源碼解析
2.1index.html-視頻區域BOX
<iframe id="palybox" src="http://vip.gzzza.com/vip.php?url=" allowfullscreen="true" allowtransparency="true" frameborder="0" scrolling="no"></iframe><div class="url-box"><div class="input-group"><input type="text" id="url" class="form-control url-text" aria-label="Text input with segmented button dropdown" placeholder="請在這粘貼視頻網址" title="請復制你想要看的視頻網址,粘貼到此處點擊播放即可!" value="http://www.iqiyi.com/v_19rrf95tfg.html"><div class="input-group-btn"><button type="button" class="btn btn-default btn-play" title="點擊開始解析并開始播放" οnclick="play()">解析播放</button></div></div></div>視頻區域是用的是一個包含播放器、url輸入框,解析按鈕的名為container的類。之前發現好多視頻解析網站都不支持全屏播放影響觀影體驗,黃色代碼是我加上去實現全屏播放的。
2.2源碼vip.php分析
<?php@$url = $_REQUEST['url'];@$pass = isset($_REQUEST['pass'])?$_REQUEST['pass']:-1;switch($pass){case 0:$jxurl = 'http://000o.cc/jx/yk.php?url=';break;case 1:$jxurl = 'http://api.baiyug.cn/vip/index.php?url=';break;case 2:$jxurl = 'https://api.daidaitv.com/index/?url=';break;case 3:$jxurl = 'http://jx.maoyun.tv/index.php?id=';break;case 4:$jxurl = 'https://api.47ks.com/webcloud/?v=';break;case 5:$jxurl = 'http://www.82190555.com/video.php?url=';break;case 6:$jxurl = 'http://api.iy11.cn/apiget.php?url=';break;case 7:$jxurl = 'http://jx.agxia.com/index.php?url=';break;case 8:$jxurl = 'http://jiexi.071811.cc/jx2.php?url=';break;default:if(strpos($url, 'pptv.com')) {$pass = 2; $jxurl = 'https://api.daidaitv.com/index/?url=';}elseif(strpos($url, 'qq.com')) {$pass = 2; $jxurl = 'https://api.daidaitv.com/index/?url=';}else {$pass = 0; $jxurl = 'http://000o.cc/jx/yk.php?url=';}}?><!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><title>自動用解析</title><link type="text/css" rel="stylesheet" href="/jscss4/v.css?v=20170303"><base target="_blank"/><?php if(strpos($url, 'baofeng.com')) echo '<script>window.parent.location.href="'.$url.'";</script>';?></head><body><!--主框架--><iframe id="rtgrhth_play_box" height='100%' width='100%' src='<? echo $jxurl.$url;?>' frameborder=0 border="0" allowfullscreen="true"></iframe><div id="tongdao"> <a class="<?if($pass==0) echo 'cur';?>" target="_self" href="vip.php?pass=0&url=<?=$url?>">本站</a> <a class="<?if($pass==1) echo 'cur';?>" target="_self" href="vip.php?pass=1&url=<?=$url?>">一線</a> <a class="<?if($pass==2) echo 'cur';?>" target="_self" href="vip.php?pass=2&url=<?=$url?>">二線</a> <a class="<?if($pass==3) echo 'cur';?>" target="_self" href="vip.php?pass=3&url=<?=$url?>">三線</a><a class="<?if($pass==4) echo 'cur';?>" target="_self" href="vip.php?pass=4&url=<?=$url?>">四線</a><a class="<?if($pass==5) echo 'cur';?>" target="_self" href="vip.php?pass=5&url=<?=$url?>">五線</a><a class="<?if($pass==6) echo 'cur';?>" target="_self" href="vip.php?pass=6&url=<?=$url?>">六線</a><a class="<?if($pass==7) echo 'cur';?>" target="_self" href="vip.php?pass=7&url=<?=$url?>">七線</a></div><!--主框架--><script src="/Public/jquery/1.11.3/jquery.min.js"></script><script src="/jscss4/vip.js?v=20170303"></script><script> $(function(){ var h = $(window).height(); $('body').height(h); $(window).resize(function(){ var h = $(window).height(); $('body').height(h);})});</script></body></html>
發現vip.php中有8種解析接口,幾乎支持目前主流的所有視頻。通過switch函數根據選擇的線路選擇相應的解析接口對url進行解析播放。
2.3 其他樣式資源文件jscss4?
包含2張圖片,1個js文件,3個css層疊樣式文件
3 參考文獻https://zhuanlan.zhihu.com/p/33061141
總結
以上是生活随笔為你收集整理的基于源码仿建视频解析网站的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 成员函数指针与高性能的C++委托(中篇)
- 下一篇: 模拟ctrl+alt+delete三键