Nonsense not much to say on the code
Copy CodeThe code is as follows:
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)); Constructing IP
curl_setopt ($ch, Curlopt_referer, $referer); Construction route
$data = curl_exec ($ch); Run Curl
Curl_close ($ch);
return $data;
}
$url = ' http://xxxxx/vote.php ';
$ref = ' http://xxxxx/index.php ';
$cookies = ";//Construct your 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.html www.bkjia.com true http://www.bkjia.com/PHPjc/327701.html techarticle Needless to say, the code copy Code code is as follows: function Curlrequest ($url, $postfield, $referer = ", $cookie =") {//http://www.jb51.net $ip = RAND (100, 244). '. '. RAND (100, 244). ' ...