php哔哩哔哩直播签到 (可能需要修复)
<?php
function SignIn4Bilibili($url, $header, $referer="", $cookie="") {
$ch = curl_init();
$options =array(
// 常量作为数组的索引
CURLOPT_URL => $url,
CURLOPT_USERAGENT => 'Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko',
//CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "gzip",
CURLOPT_HEADER => 0,
CURLOPT_HTTPHEADER => $header,
CURLOPT_REFERER => $referer,
CURLOPT_COOKIE => $cookie,
// 规避SSL验证
CURLOPT_SSL_VERIFYPEER => false,
// 跳过HOST验证
CURLOPT_SSL_VERIFYHOST => false,
// 超时时间
CURLOPT_TIMEOUT => 100,
);
curl_setopt_array($ch, $options);
$result = curl_exec($ch);
curl_close($ch);
return $result;
}
?>
<?php
// 不能使用关联数组
$header = array();
$header[] = "authority: api.bilibili.com";
$header[] = "Accept: application/json, text/plain, */*";
$header[] = "origin: https://www.bilibili.com";
$header[] = "referer: https://www.bilibili.com";
$header[] = "cookie: your cookie";
$url = "https://api.bilibili.com/x/web-interface/nav/stat";
echo SignIn4Bilibili($url, $header);
/*
// 常量作为数组的索引
$api = 'fucku';
$options =array(
0 => "index 0",
CURLOPT_URL => $api,
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => array('Content-Type: text/plain'),
);
echo "</br>";
//var_dump ($options);
echo "</br>";
echo $options;
echo "</br>";
echo $options;
echo "</br>";
echo $options;
*/
?>http://cdn.u1.huluxia.com/g4/M03/06/4F/rBAAdmKHeiyAENKnAABKhoIWRqQ887.jpg
在撸一遍。。。 楼猪V5啊 前排支持下了哦~ 好,很好,非常好! 路过 帮顶 嘿嘿 …… 我是个凑数的。。。 楼下的接上
页:
[1]