PHP automatically performs the login operation after discovering that the login has expired, and then continues the previous step.
暖暖橙
暖暖橙 2022-06-13 15:06:16
0
1
1283

Conditions: There is a third-party website, and every step of the operation needs to be logged in. Now I have built a simple front-end page and used PHP to make a springboard in the middle.

Process: Every request on the page I built is transmitted to the PHP springboard through ajax, and then the PHP springboard uses curl to simulate operations to request and transfer data to the third-party website. I store the session information in the database, and then retrieve it from the database before each curl operation, and then carry it with curl.

Problem: Third-party websites have login expiration restrictions. So one of my operations here may have failed because the session with the third-party website has expired.

Requirement: After PHP receives the information that a certain session has expired, it will automatically perform the login operation and continue the previously failed request.

My current method is to record each request action and data into a static variable, and then use call_user_func_array() to call it again after logging in again, but each operation cannot be completed, and it can only be done This step of automatic login cannot be completed by subsequent re-calls. do not know why. I hope the Great God Gate can give me some advice. Thanks!

暖暖橙
暖暖橙

reply all(1)
大瓶可乐

Do you want to cooperate?

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template