$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);//Log in to the submitted address
curl_setopt($curl, CURLOPT_HEADER, 0);/ /Whether to display header information
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 0);//Whether to automatically display the returned information
curl_setopt($curl, CURLOPT_COOKIEJAR, $cookie); //Set Cookie The information is saved in the specified file
curl_setopt($curl, CURLOPT_POST, 1);//Submit in post mode
curl_setopt($curl, CURLOPT_POSTFIELDS, $post);//To be submitted Information
curl_exec($curl);//Execute cURL
curl_close($curl);//Close
$post = "loginname=****** &password=******";
$url = "http://www.jinhu11.com/index/index/login";
$ cookie = dirname(__FILE__) . '/cookie_jinhu.txt';
Why the simulated login is not successful.
This depends on whether your server has done corresponding anti-packet capture processing. You can check the return information of your submission verification