欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

解析PHP跨站刷票的實(shí)現(xiàn)代碼

 更新時(shí)間:2013年06月18日 16:04:38   作者:  
本篇文章是對PHP跨站刷票的實(shí)現(xiàn)代碼進(jìn)行了詳細(xì)的分析介紹,需要的朋友參考下
廢話不多說,上代碼
復(fù)制代碼 代碼如下:

function curlrequest($url, $postfield,$referer='',$cookie='') {
 //http://www.dbjr.com.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)); //構(gòu)造IP
 curl_setopt($ch, CURLOPT_REFERER, $referer); //構(gòu)造來路
  $data = curl_exec($ch); //運(yùn)行curl
  curl_close($ch);
  return $data;
 }
 $url='http://xxxxx/vote.php';
 $ref='http://xxxxx/index.php';
 $cookies='';//構(gòu)造你的cookies
 $postfield=array(
  'information_id'=>201204211839164950
 );
 $postfield = http_build_query($postfield);
 $result = curlrequest($url, $postfield,$ref,$cookies);
 echo $result;

相關(guān)文章

最新評論