curl simulated login
phpcn_u68041
phpcn_u68041 2017-12-08 17:12:32
0
1
1400

$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.

phpcn_u68041
phpcn_u68041

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!