- 结晶驿站2019-04-11新手上路100306
php文件来与天天在线分享的
问题是打开这个php时,浏览器提示“Fatal error: Call to undefined function userip() in /home/wwwroot/default/tv.php on line 144”
有哪位大佬知道该怎么操作的?- = count($CODE_MAP)){
- $bIndex = $bIndex - count($CODE_MAP);
- }
- $accountStr .= $CODE_ARRAY[$bIndex];
- } else {
- $accountStr .= $a;
- }
- }
- $softwareVersion = substr($accountStr, strrpos($accountStr, "@") + 1);
- $accountStr = substr($accountStr, 0, strrpos($accountStr, "@"));
- $softwareCode = substr($accountStr, strrpos($accountStr, "@") + 1);
- $accountStr = substr($accountStr, 0, strrpos($accountStr, "@"));
- $resp['client_ip'] = $clientIp;
- $resp['version'] = $version_tm;
- $resp['account'] = $accountStr;
- $resp['software_code'] = $softwareCode;
- $resp['software_version'] = $softwareVersion;
- $resp['token'] = $acc_token;
- return $resp;
- }
- - function getNToken($clientIp = "127.0.0.1", $account = "132020005012", $softwareCode = "SUNTV", $softwareVersion = "0.4.89", $prefix = "O"){
- $ipbuf = array();
- $CODE_MAP = array();
- $acinfo = "a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,1,2,3,4,5,6,7,8,9,0,-,_,@,.";
- $CODE_ARRAY = explode(",", $acinfo);
- for($i=0;$i strlen($suffix)){
- $cLength = $accountLength - strlen($suffix);
- $suffix = getRandomString($cLength) . $suffix;
- }
- $tokenbuf = "";
- if($accountLength = $keyValue){
- $bIndex = $aIndex - $keyValue;
- } else {
- $bIndex = count($CODE_ARRAY) + $aIndex - $keyValue;
- }
- $tokenbuf .= $CODE_ARRAY[$bIndex];
- } else {
- $tokenbuf .= $a;
- }
- }
- $tokenbuf .= $suffix;
- return base64UrlEncode($tokenbuf);
- }
- - $uidlist = ["142029001763","142029001915","142029001916","142029001976"];
- $rand_keys = array_rand($uidlist);
- $access_token = getNToken(userip(), $uidlist[$rand_keys]);
- $stype = empty($_GET['type']) ? "ipsd" : trim($_GET['type']);
- $channel = empty($_GET['channel']) ? "CCTV1HD" : trim($_GET['channel']);
- $strUrl = sprintf("http://stream.suntv.tvmining.com/approve/live?channel=%s&type=%s&access_token=%s", $channel, $stype, $access_token);
- echo $strUrl;
- 复制代码