PHP curl function to simulate crawler (operation cookie brush paste example)

time:15-04-08 forum:PHP tools and code
  http://www.cnblogs.com/tohilary/archive... 79501.html

[code].lt; H, CURLOPT_COOKIEJAR, "E:/cookie.txt"); a
curl_setopt ($ch, CURLOPT_POST, 1);
curl_setopt ($ch, CURLOPT_POSTFIELDS, "XX") //xx represents the data
> = / / / / / / / / / / / / > H = curl_init ();
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
/ / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / L_setopt ($ch, CURLOPT_URL, "http://www.mynit.net/post.php");
curl_setopt ($ch, CURLOPT_POST, 1);
curl_setopt ($ch, CURLOPT_POSTFIELDS, ");
$buf2 = curl_exec ($ch);
curl_close ($ch);
echo $buf2; / / return result
; $buf2;
  • 2
  • 3

prev:PHP curl function simulation browser gra... next:PHP gets Cookie analog login
post comment
Notice



approved   Ji'nan social insurance and professi...   Ji'nan education website   Ji'nan second hand goods transaction...   Ji'nan neighborhood committee websit...   PhpBB official support station (Engl...
rand   A brief discussion on comet Technolo...   Javascript/php implements comet (Aja...   Using Json to realize data exchange ...   PHP verification code landing check   Install.php simple production
ads

other

Because all the contents of this site are reproduced from other media, the intention is to provide free services to the public, but it does not mean that this site agrees with its views, and can not be responsible for the authenticity of its verification, such as the copyright unit or individual of the manuscript does not want to publish on this site, please Contact me, I will immediately remove it, thank you. Contact: atseashawk@163.com