<?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;
}
评论
106条评论宝贝我弯腰 Lv.1 回复
芜湖!牛批!
看我干什么^_^ 回复一下鸭!
。 Lv.1 回复
牛啊卧槽
看我干什么^_^ 回复一下鸭!
小熊丢啦~ Lv.1 回复
需要全套文件加我QQ啦~51867445 白菜价~ 什么功能都有~
看我干什么^_^ 回复一下鸭!
及时 Lv.1 回复
芜湖~真不戳!
看我干什么^_^ 回复一下鸭!
池鱼 Lv.1 回复
好家伙,居然更新了
看我干什么^_^ 回复一下鸭!
今晚几点睡. Lv.1 回复
打卡,我求了一下他免费给我了,爱辽!
看我干什么^_^ 回复一下鸭!
111 Lv.1 回复
回复了今晚几点睡.:免费版的能给来一个吗
看我干什么^_^ 回复一下鸭!
爱妈萌果酱 Lv.1 回复
回复了111:我也想要
看我干什么^_^ 回复一下鸭!
爱情之梦 Lv.1 回复
好像没有更新耶
看我干什么^_^ 回复一下鸭!
玖玖 Lv.1 回复
可不可以白嫖啊哈哈哈哈哈
看我干什么^_^ 回复一下鸭!
″尤物 Lv.1 回复
回复了玖玖:可以!我求了好长时间!哈哈哈哈哈
看我干什么^_^ 回复一下鸭!
六月 Lv.1 回复
希望可以优化,关感染者的时候会卡顿一下
看我干什么^_^ 回复一下鸭!
疯过的ㄖ子 Lv.1 回复
催更!!!
看我干什么^_^ 回复一下鸭!
Sorry千秋 Lv.1 回复
回复了疯过的ㄖ子:不能用了吧
看我干什么^_^ 回复一下鸭!