您好,欢迎访问一九零五行业门户网

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

废话不多说,上代码
复制代码 代码如下:
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).'...
其它类似信息

推荐信息