What if curl performs https simulated login? What should I do?

Source: Internet
Author: User
What if curl performs https simulated login? After visiting a website A.com. cnXXX, the system prompts that the user name and password are all known. you can click here to log on to the website ~~~ But how should I simulate login with curl ?? Are there any successful cases? ------ Solution ------------------ There is an example, but I have never verified that you can verify PHPcode $ chcurl_init (if curl performs https simulated login?
There is a website:
Https://A.com.cn/XXX

Prompt after access:


This user name and password are all known. you can log on to the console by clicking here ~~~

But how should I simulate login with curl ?? Are there any successful cases?

------ Solution --------------------
There is an example, but I have never verified that you can verify

PHP code
$ Ch = curl_init ("http: // localhost/test. php "); curl_setopt ($ ch, batch, 1); curl_setopt ($ curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); curl_setopt ($ curl, CURLOPT_USERPWD, 'myuser: mypwd '); // sending username and pwd. curl_setopt ($ curl, expires, false); curl_setopt ($ curl, CURLOPT_FOLLOWLOCATION, true); curl_setopt ($ curl, CURLOPT_USERAGENT, 'sample code'); curl_setopt ($ curl, expires, true); $ output = curl_exec ($ ch); print_r (curl_getinfo ($ ch); curl_close ($ ch); echo'

'; Echo $ output;
------ Solution --------------------
What about the curl header?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.