QQ名片赞PHP协议 - 子涵小窝Blog⎛⎝Blog⎠⎞

QQ名片赞PHP协议

作者: zihan

全网最全的网络资源分享网站

手机扫码查看

标签:

源码分享

特别声明:文章多为网络转载,资源使用一般不提供任何帮助,特殊资源除外,如有侵权请联系子涵!

来自于网络大佬的整合

<?php
error_reporting(0);
header('content-type:application/json');
date_default_timezone_set("PRC");
$data=$_POST;
$qq=$data['qq'];
$uin=$data['uin'];
$skey=$data['skey'];
$pskey=$data['pskey'];
$count=isset($data['count'])?$data['count']:0;
$gtk=gtk($pskey);
if(!$qq || !$uin || !$skey || !$pskey)exit('error');
$cookie = 'pt2gguin=o0' . $uin . '; uin=o0' . $uin . '; skey=' . $skey . '; p_uin=o0' . $uin.'; p_skey='.$pskey.';';for($i=0; $i<=$count; $i++){
$url='https://club.vip.qq.com/visitor/like?g_tk='.$gtk.'&nav=0&uin='.$qq.'&t='.times();
$json=get_curl($url,0,'https://club.vip.qq.com/visitor/index?_wv=4099&_nav_bgclr=ffffff&_nav_titleclr=ffffff&_nav_txtclr=ffffff&_nav_alpha=0',$cookie);}
$arr=json_decode($json,true);
if($arr['retcode']==20003){
$json ='点赞上限';
}elseif($arr['retcode']==10003)
 $json ='权限异常';
}elseif($arr['code']=="-400"){
   $json ='登录失效';
}elseif($arr['retcode']==0){
  $json ='点赞成功';
}else{
    $json ='点赞失败';
}
//$fp = fopen("./cookie.log","a+");
//fwrite($fp,$cookie."\r");
//fclose($fp);
exit($json);
function times() {
    list($t1, $t2) = explode(' ', microtime());
    return (float)sprintf('%.0f',(floatval($t1)+floatval($t2))*1000);}
function GTK($skey){
    $len = strlen($skey);
  $hash = 5381;
    for ($i = 0; $i < $len; $i++) {
        $hash += ($hash << 5 & 2147483647) + ord($skey[$i]) & 2147483647;
        $hash &= 2147483647;
    }
    return $hash & 2147483647;
}
function get_curl($url,$post=0,$referer=0,$cookie=0,$header=0,$ua=0,$nobaody=0,$split=0){
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL,$url);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
    $httpheader[] = "Accept:*/*";
    $httpheader[] = "Accept-Encoding:gzip,deflate,sdch";
    $httpheader[] = "Accept-Language:zh-CN,zh;q=0.8";
    $httpheader[] = "Connection:close";
    curl_setopt($ch, CURLOPT_HTTPHEADER, $httpheader);
    if($post){
        curl_setopt($ch, CURLOPT_POST, 1);
        curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
    }
    if($header){
        curl_setopt($ch, CURLOPT_HEADER, TRUE);
    }
    if($cookie){
        curl_setopt($ch, CURLOPT_COOKIE, $cookie);
    }
    if($referer){
       curl_setopt($ch, CURLOPT_REFERER, $referer);
   }
    if($ua){
        curl_setopt($ch, CURLOPT_USERAGENT,$ua);
    }else{
        curl_setopt($ch, CURLOPT_USERAGENT,'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.152 Safari/537.36');    }
    if($nobaody){
        curl_setopt($ch, CURLOPT_NOBODY,1);    }
    curl_setopt($ch, CURLOPT_ENCODING, "gzip");
    curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION,1);
    $ret = curl_exec($ch);
    if ($split) {
       $headerSize = curl_getinfo($ch, CURLINFO_HEADER_SIZE);
        $header = substr($ret, 0, $headerSize);
        $body = substr($ret, $headerSize);
        $ret=array();
        $ret['header']=$header;
       $ret['body']=$body;
    }
    curl_close($ch);
    return $ret;
}
分享到:
打赏
未经允许不得转载:

阅读时间:   发布于:2020-7-18
文章标题:《QQ名片赞PHP协议》
本文链接:https://zbk52.com:443/post-3.html
本文编辑:作者 - zihan - 转载或复制请以 超链接形式 并注明出处 子涵小窝Blog⎛⎝Blog⎠⎞
收录状态:[百度已收录]-[360已收录]-[搜狗已收录]

切换注册

登录

忘记密码?

您也可以使用第三方帐号快捷登录

切换登录

注册

QQ名片赞PHP协议

长按图片转发给朋友

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏

召唤伊斯特瓦尔