> >

Re: PHP cURL to achieve simulation login and collection method of use

time:17-06-29 forum:PHP tools and code
  The following is I do a POST simulation search PHP POST search, the back end is the use of the front of the Baidu keyword search, the basic principle is, the client submits a keyword to my server, my server uses the keyword search for Baidu, and then get the results, return to the client.


like figure (four) is an analysis of request data using Firebug to get the request links and request parameters we need to submit:
cURL POST parameter analysis

and next is our code:

[code ]$keyword ='PHP cURL';
/ / / / / / / / / / / / / / / $post ='wd='. URLEncode ($keyword);
/ / / / / / > $post = = = > = = > = = = > = = > = = > = > = = > = > = > = = > = > = = > = > = > = > = > = > = = > = > = = > = > = > = > = > = > = > = = > = > = > = > = > = > = > = > = > = > = > = > = > = > = > = > = > = =
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12

prev:PHP curl function simulated crawler (ope... next:Advantages and disadvantages of cURL, fi...
post comments
Notice



Approved   Reminder: Taobao's new scam, do not ...   Recruitment of job search websites i...   Ji'nan related blog collection   Nine cases of individual advisable h...   Ten big springs in Ji'nan
rand   PHP implementation of Web screenshot   Snap2HTML - hard disk file generatio...   PHP random number generation and use...   Talk about 10 MySQL mistakes that PH...   10 MySQL errors that PHP developers ...
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