您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

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

2025/11/10 22:15:36发布14次查看
废话不多说,上代码
复制代码 代码如下:
function curlrequest($url, $postfield,$referer='',$cookie='') {
 //http://www.jb51.net
  $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;
http://www.bkjia.com/phpjc/327701.htmlwww.bkjia.comtruehttp://www.bkjia.com/phpjc/327701.htmltecharticle废话不多说,上代码 复制代码 代码如下: function curlrequest($url, $postfield,$referer='',$cookie='') { //http://www.jb51.net $ip= rand(100, 244).'.'.rand(100, 244).'...
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product