Get the App
SLTechnology News&Howtos  ›  Development  › 

How to solve the loss of php request

Shulou Source: shulou.com Published: 2022-06-03 00:08:12 09月29日 Update

This article focuses on "how to solve the loss of php requests". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "how to solve the loss of php requests".

1. Urlencode the encrypted string before sending it.

2. Set port 8888 from proxy to fiddler in curl.

Php curl post request missing'+ 'problem

Background:

Using the jump of login-free authorization with competitors, it is found that the authorization fails occasionally. After checking the log, the authorization will fail if you add the'+ 'character in the password.

By grabbing the packet, it is found that the'+ 'will be converted to a space when php uses curl to send the request (for unknown reasons. It is suspected that curl has done urldecode processing by default)

The solution is:

Urlencode the encrypted string before sending it.

P.S.

In addition, https's request to capture and decode packets on linux does not seem to be easy to handle. Later, use fiddler to grab packets on windows. After setting the crawl https, it is found that the request coming out of the php code has not been caught. You need to set a proxy in curl to port 8888 of fiddler in order to successfully crawl.

Curl_setopt ($ch,CURLOPT_PROXY,'127.0.0.1:8888'); at this point, I believe you have a better understanding of "how to solve the loss of php requests". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Tags: Processing content method port middle set agent encryption learning practicality deeper success code interest reason character practicality practicality password simple operation log Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple Shulou Information NVidia Shulou Tech Info vpn