PHPCURL simulates logon questions for help. You are welcome to watch it out. even if you don't answer it, you will surely get $ post_fields ['Zookeeper '] = $ this-& gt; username; $ post_fields ['mm'] = $ this-& gt; password; $ ch & nbsp; = & nbsp; curl_init ($ this-& php curl simulate logon for help, you are welcome to watch it out, even if you don't answer it, you will surely get it.
$post_fields['zjh']=$this->username;
$post_fields['mm']=$this->password;
$ch = curl_init($this->login_url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_fields);
curl_setopt($ch, CURLOPT_COOKIEJAR, $this->cookie_file);
$str=curl_exec($ch);
curl_close($ch);
This is a code snippet in the class. it is used to simulate logon, but if a problem is found, if the submitted password starts with @, then the CURLOPT_POSTFIELDS section considers that a file has been submitted, this causes logon failure. How can this problem be solved?
CURL description in http://cn2.php.net/curl_setopt
If you don't answer the question, it doesn't matter. do you think it's an inspiration? To prevent your website from being crawled by CURL login, you can find a required form item starting with @, so that my simulated login will become invalid...
Who will answer the question .. Thank you.
------ Solution --------------------
This post was last edited by xuzuning at 09:26:17.
Php-curl encapsulation [avoid file Upload ambiguity Bug]
------ Solution --------------------
Use the httpclient. class. php class to try.