bet188直播代理爬虫代码分析

作者:admin人气:2更新:2021-04-21 21:42:17

这是一套PHP的爬虫项目,主要是用来获取得到足球比赛的列表以及直播源,这套代码写法比较少见,有兴趣的同学可以深入研究,如果看不懂的可以咨询我,不过可是付费的哦,毕竟玩这类东西的人你们都懂的,都是玩现金的,说实话不是一般人能玩的,所以只放出了部分代码供大家研究,商用的代码可以联系我有偿获取。

<?php

error_reporting(E_ALL^E_NOTICE);

include 'fun.php';

date_default_timezone_set('Asia/Shanghai');

header ('Content-type: text/html;charset= UTF-8');

$url = $_REQUEST['url'];

$eventId = $_REQUEST['eventId'];

$ln = $_REQUEST['ln'];

$userID = rand(10000000000000000,99999999999999999);

$partnerName = "188";

//$partnerID = "265";

//$seed = "aaa";

$partnerID = "17";

$seed = "abc";

$key = $userID . $partnerID . $eventId . "L" . $seed;

$hash = urlencode(base64_encode(md5($key, true)));

$UrlStr = "https://secure.${partnerName}.performgroup.com/streaming/wab/multiformat/index.html?partnerId=${partnerID}&eventId=${eventId}&userId=${userID}&key=${hash}&audioLang=zh-cn";

$UrlStr = getContent($UrlStr);

preg_match_all('/\[CDATA\[([\s\S]*?)\]\]/',$UrlStr,$b1);

$location = $b1[1][1];

if(empty($location)){

$location = $b1[1][0];

}

/*

if($ln === "西乙"){

exit($location);

}

*/

preg_match("|\/\/(.*?)\/|i",$location,$CodeS); 

$domains = $CodeS[1];

if($domains === "281596-lh.akamaihd.net"){

    /*

$UrlStr = getContent($location);

preg_match_all("/https([\s\S]*?)\n/",$UrlStr,$b1);

$location = $b1[0][1];

$location = str_replace('index_150_av','index_512_av',$location);

$location = str_replace('index_280_av','index_512_av',$location);

$location = str_replace('index_1000_av','index_512_av',$location);

*/

//https://281596-lh.akamaihd.net/i/wabadhocch06_0@331135/index_512_av-b.m3u8?sd=2&rebase=on&hdntl=exp=1591296761~acl=%2f*%2fwabadhocch06_0%40331135*~data=hdntl~hmac=eab28c0f05dcf33e65b451cda8db816d7784cf02f2893616c340d47ff4f0294c&unique_id=91464891346fca451b963002514923cc8142fe0212484e119d54ec2e6a88018ea6f25b

exit($location);

/*

$UrlStr = "https://secure.${partnerName}.performgroup.com/streaming/urls/event/index.html?partnerId=${partnerID}&eventId=${eventId}&userId=${userID}&key=${hash}&audioLang=zh-cn";

$rtmplocation = getContent($UrlStr);

preg_match('|videohi=(.*?)&videolo|i',$rtmplocation,$CodeS); 

$rtmplocation = $CodeS[1];

$l4 = substr($rtmplocation,0,4);

if($l4 === "rtmp"){

exit($rtmplocation);

}else{

exit($location);

}

*/

}

exit($location);

?>


更多标签

Copyright kds.tw Rights Reserved.