Back

获取B站热度排序的鬼畜视频

Small color 2017年06月01日

1.png
沉迷鬼畜-无法自拔
博客加入了B站的最新热门鬼畜视频,点击博客首页的图片即可出现播放器!

  • B站热门鬼畜获取接口
    接口:http://www.ismallcolor.com/usr/themes/Material/Gvideo.php

由于PHP我没学过,技术上很多问题,只能乱写。会PHP自己改良,给你们提供参考!
接口源码:

<?php 
$current_time=date("Ymd");
if(date("d")<07){
    $Time7=date("Ymd")-7;
    $Time7=$Time7-70;
}else{
    $Time7=date("Ymd")-7;
}

$jk="http://s.search.bilibili.com/cate/search?main_ver=v3&search_type=video&view_type=hot_rank&pic_size=160x100&order=click&copy_right=-1&cate_id=22&page=1&pagesize=20&time_from=".$Time7."&time_to=".$current_time;

$szUrl = $jk;
    $UserAgent = 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.0.04506; .NET CLR 3.5.21022; .NET CLR 1.0.3705; .NET CLR 1.1.4322)';
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, $szUrl);
    curl_setopt($curl, CURLOPT_HEADER, 0);  //0表示不输出Header,1表示输出
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
    curl_setopt($curl, CURLOPT_ENCODING, '');
    curl_setopt($curl, CURLOPT_USERAGENT, $UserAgent);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
    $fh = curl_exec($curl);
    if(preg_match_all("/arcurl\":\"http:....www.bilibili.com..video..av\d+/",$fh,$a)){
        $AVh=substr($a[0][rand(0,19)],45);
        
    }

$html = <<<HTML
        <embed width="100%"  allownetworking="internal"  bgcolor="#ffffff" allowscriptaccess="never" quality="high" wmode="transparent" allowfullscreen="true" id="bfq" height="100%" onclick="bofang()" name="plugin" src="http://static.hdslb.com/miniloader.swf?aid=$AVh&amp;page=1" type="application/x-shockwave-flash">
            

HTML;
echo $html;



?>

xiaokian.pngaaaaa.pngkaixin.pnghang.pnghuaji.pngtushe.pnglei.pngyanxian.pngyiwen.pngzhenbang.pngmianq.pnglen.pngbishi.pngyi.pnghh.pngpeng.pngbugaox.pngqian.pngtaikx.pngnuhuo.pnghang 2.pngtu.png
Submit

  商业友情链接:   超越娱乐注册   传奇私服   阳光在线   免费菠菜源码   三张牌游戏   炸金花   吉祥棋牌   秋霞电影网

Title - Artist
0:00