I plan to use PHP to simulate logging into TFS on the intranet, and then update the task regularly. Now the first step is to simulate logging into TFS, but I use firefox to try to capture the login data packet, but I can’t see the GET or POST fields. .
As shown below, when you open this webpage, a login box will pop up:
This is after filling in the account and password, but I can’t find the POST or GET content. Please give me some advice!
I plan to use PHP to simulate logging into TFS on the intranet, and then update the task regularly. Now the first step is to simulate logging into TFS, but I use firefox to try to capture the login data packet, but I can’t see the GET or POST fields. .
As shown below, when you open this webpage, a login box will pop up:
This is after filling in the account and password, but I can’t find the POST or GET content. Please give me some advice!
This is HTTP Basic Authorization, not GET or POST
Add the Authorization header when requesting, the value is "Basic "+base64_encode(username+':'+password)
PHP code
<code>$curl = curl_init(); curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); curl_setopt($curl, CURLOPT_USERPWD, "[$username]:[$password]");</code>
This is not an ordinary get or post
This is http authentication
https://segmentfault.com/a/11...
Fill in the username and password, and then confirm. To capture the data packet for this interaction, there will be post or get field names and values in it