源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

解析PHP跨站刷票的实现代码

  • 时间:2020-09-11 22:04 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:解析PHP跨站刷票的实现代码
废话不多说,上代码
[u]复制代码[/u] 代码如下:
function curlrequest($url, $postfield,$referer='',$cookie='') {  //http://www.1sucai.cn   $ip= rand(100, 244).'.'.rand(100, 244).'.'.rand(100, 244).'.'.rand(100, 244);   $ch = curl_init();   curl_setopt($ch, CURLOPT_URL, $url);   curl_setopt($ch, CURLOPT_HEADER, 0);   curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);   curl_setopt($ch, CURLOPT_POST, 1);   curl_setopt($ch, CURLOPT_POSTFIELDS, $postfield);   curl_setopt($ch, CURLOPT_COOKIE, $cookie);   curl_setopt($ch, CURLOPT_HTTPHEADER, array('X-FORWARDED-FOR:'.$ip, 'CLIENT-IP:'.$ip)); //构造IP  curl_setopt($ch, CURLOPT_REFERER, $referer); //构造来路   $data = curl_exec($ch); //运行curl   curl_close($ch);   return $data;  }  $url='http://xxxxx/vote.php';  $ref='http://xxxxx/index.php';  $cookies='';//构造你的cookies  $postfield=array(   'information_id'=>201204211839164950  );  $postfield = http_build_query($postfield);  $result = curlrequest($url, $postfield,$ref,$cookies);  echo $result;
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部