I really don't know how to simulate logging into this website. I can't get the data using Firefox.

WBOY
Release: 2023-03-02 10:24:02
Original
1117 people have browsed it

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:

I really don't know how to simulate logging into this website. I can't get the data using Firefox.

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 really don't know how to simulate logging into this website. I can't get the data using Firefox.

I really don't know how to simulate logging into this website. I can't get the data using Firefox.

Reply content:

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:

I really don't know how to simulate logging into this website. I can't get the data using Firefox.

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 really don't know how to simulate logging into this website. I can't get the data using Firefox.

I really don't know how to simulate logging into this website. I can't get the data using Firefox.

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>
Copy after login

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

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template