Without considering the verification code, PHP implements simulated login. The method given on the Internet is generally to use curl to simulate the implementation. However, curl implements a session between the server and the server. You can only simulate the login and obtain the login. For subsequent data, the cookie information cannot be planted on the client (at least I haven't found a way to do it so far) and I finally achieved it through a hidden iframe. This article mainly introduces the simple implementation of simulated login function in PHP, and involves related operating techniques of using curl to implement simulated login in PHP. Friends who need it can refer to it. I hope it can help everyone.
1. curl implements the code to simulate login (it only implements the establishment of a session between the server and the server, but does not actually establish a session between the client and the server)
'; echo strip_tags($orders); echo ''; curl_close($ch2); ?>
2. Realize communication between client and server through hidden iframe (may bring certain security risks)
##
$goURL="http://192.168.0.22/general/email/"; ?>
Yii2 framework implements login, logout and automatic login functions
thinkphp verification code login function implementation example
PHP implements verification email activation and login function after new user registration
The above is the detailed content of PHP simple simulated login function example sharing. For more information, please follow other related articles on the PHP Chinese website!