Using the Curl method to simulate Telnet * Analog login bbs.php100.com
$cookie _file= Tempnam ('./temp ', ' Cookie '); $login _url= ' http://bbs.php100.com/login.php '; $post _fields= ' cktime= 31536000&step=2&pwuser= Enter your username here &pwpwd= enter your password here '; $ch = Curl_init ($login _url); curl_setopt ($ch, Curlopt_header, 0); curl_setopt ($ch, Curlopt_returntransfer, 1); Curl_ Setopt ($ch, Curlopt_post, 1); curl_setopt ($ch, Curlopt_postfields, $post _fields); curl_setopt ($ch, Curlopt_cookiejar, $cookie _file); curl_exec ($ch); Curl_close ($ch) ; $url = ' http://bbs.php100.com/userpay.php '; $ch = Curl_init ($url); curl_setopt ($ch, Curlopt_header, 0); curl_setopt ($ch , Curlopt_returntransfer, 1); curl_setopt ($ch, Curlopt_cookiefile, $cookie _file); $contents = curl_exec ($ch);p Reg_ Match ("/Gold coins: (. *) <\/li>/", $contents, $arr); Echo$arr[1];curl_close ($ch);