Curl If you are doing an HTTPS analog login?
There is a website:
Https://A.com.cn/XXX
Prompt after access:
This user name and password are known, click to log in normally ~ ~ ~
But what if you should use curl to do a mock landing?? Is there a successful case?
------Solution--------------------
There's an example, but I've never verified that you can verify the validation
PHP Code
$ch = Curl_init ("http://localhost/test.php"); curl_setopt ($ch, Curlopt_returntransfer, 1); curl_setopt ($curl, curlopt _httpauth, Curlauth_basic) curl_setopt ($curl, curlopt_userpwd, ' myuser:mypwd ');//sending username and Pwd.curl_ Setopt ($curl, Curlopt_ssl_verifypeer,false); curl_setopt ($curl, curlopt_followlocation,true); curl_setopt ($curl, Curlopt_useragent, ' Sample Code '); curl_setopt ($curl, Curlinfo_header_out, true); $output = curl_exec ($ch);p Rint_r ( Curl_getinfo ($ch)); Curl_close ($ch); Echo '
'; Echo $output;
------Solution--------------------