Regardless of the verification Code, PHP implementation of the simulation landing, the method of the Internet is generally used to simulate the implementation of curl, but curl is the server-side and server-side set up a session, can only simulate the landing after the landing data, The cookie information cannot be planted on the client (at least for the moment I find no way to find it) and finally by the hidden IFrame.
1, curl implementation of the code to login, (just to implement the server and the server to establish a session, in fact, there is no session between the client and the server)
<?php$cookie_jar = Tempnam ('./tmp ', ' Cookie '); $ch = Curl_init (); curl_setopt ($ch, Curlopt_url, ' http://192.168.0.22/logincheck.php '); curl_setopt ($ch, Curlopt_post, 1); $request = ' uname=admin&password=123456 '; curl_setopt ($ch, Curlopt_postfields, $request); Keep the returned cookie information in the $cookie_jar file curl_setopt ($ch, Curlopt_cookiejar, $cookie _jar); Sets whether the returned data is automatically displayed curl_setopt ($ch, Curlopt_returntransfer, 1); Sets whether to display header information curl_setopt ($ch, Curlopt_header, false); Sets whether to output page content curl_setopt ($ch, Curlopt_nobody, false); Curl_exec ($ch); Curl_close ($ch);//get data after login $ch 2 = Curl_init (); curl_setopt ($ch 2, Curlopt_url, ' http://192.168.0.22/general/'); curl_setopt ($ch 2, Curlopt_header, false); curl_setopt ($ch 2, Curlopt_returntransfer, 1); curl_setopt ($ch 2, Curlopt_cookiefile, $cookie _jar); $orders = Curl_exec ($ch 2); echo $orders; Exit;echo ' <pre> '; echo Strip_tags ($orders); Echo ' </pre> '; Curl_close ($ch 2);?>2, through the hidden IFRAME to achieve client-server communication (Ken can bring a certain security risks)
ceshi1.php
PHP Implementation Simulation Login