I really don't know how to simulate login to this URL, and firefox didn't catch the get data.

Source: Internet
Author: User
Tags http authentication
I'm going to use PHP to simulate logging on to the intranet TFS, and then update the task regularly. now, the first step is to simulate logging on to TFS, but use firefox to try to capture the login data packet, however, you cannot see the GET or POST fields. For example, when you open this page, the login box will pop up: This is filled in...

I'm going to use PHP to simulate logging on to the intranet TFS, and then update the task regularly. now, the first step is to simulate logging on to TFS, but use firefox to try to capture the login data packet, however, you cannot see the GET or POST fields.
For example, if you open this webpage, the login box will pop up:

The password is entered, but no POST or GET content can be found. please give me some advice!

Reply content:

I'm going to use PHP to simulate logging on to the intranet TFS, and then update the task regularly. now, the first step is to simulate logging on to TFS, but use firefox to try to capture the login data packet, however, you cannot see the GET or POST fields.
For example, if you open this webpage, the login box will pop up:

The password is entered, but no POST or GET content can be found. please give me some advice!

This is HTTP Basic Authorization, not GET or POST.

Add when requestingAuthorizationHeader, value:"Basic" + base64_encode (username + ':' + password)
PHP code

$curl = curl_init();curl_setopt($curl, CURLOPT_URL, $url);curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);curl_setopt($curl, CURLOPT_USERPWD, "[$username]:[$password]");

This is not a common get or post
This is http authentication.

Https://segmentfault.com/a/11...

Enter the user name and password, and then confirm that the data packet for this interaction will contain the post or get field name and value.

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.