Analog Login Verification Code PHP
Get Verification Code
Header (' content-type:image/png ');
$authcode _url= "http://jwxt1.cumt.edu.cn/CheckCode.aspx";
$cookieFile = "Cookie.tmp";
$ch = Curl_init ($authcode _url);
curl_setopt ($ch, Curlopt_cookiejar, $cookieFile); Save the returned cookie information in a file
Curl_exec ($ch);
Curl_close ($ch);? >
Manually enter the verification code
Get information
Verification Code:
Analog Login
/**
- Created by Phpstorm.
- User:apple
- Date:15/9/30
- Time: PM 7:08*/
$loginParams [' __viewstate ']= ' ddwyode2ntm0otg7oz6gizhuhuo9i4p23lszjjnryu9enq== ';
$loginParams [' __viewstategenerator ']= ' 92719903 ';
$loginParams [' txtusername '] = ' study number ';
$loginParams [' TextBox2 '] = ' password ';
$loginParams [' txtsecretcode '] = $_post[' Vcode ');
$loginParams [' lblanguage '] = ';
$loginParams [' RadioButtonList1 '] = iconv (' utf-8 ', ' gb2312 ', ' students ');
$loginParams [' Button1 '] = iconv (' utf-8 ', ' gb2312 ', ' login ');
$url = "http://jwxt1.cumt.edu.cn/default2.aspx";
$cookieFile = "Cookie.tmp";
$curl = Curl_init ();
curl_setopt ($curl, Curlopt_url, $url);
curl_setopt ($curl, Curlopt_header, 0);
curl_setopt ($curl, Curlopt_returntransfer, 0);
curl_setopt ($curl, Curlopt_cookiefile, $cookieFile);
curl_setopt ($curl, Curlopt_cookiejar, $cookieFile);
curl_setopt ($curl, Curlopt_post, 1);//post mode submission
curl_setopt ($curl, Curlopt_postfields, Http_build_query ($loginParams));
Curl_exec ($curl);
Curl_close ($curl);
?>
Request verification code and then manually enter the last cookie with the request verification code and then post data Browser does not display the verification code or password error but why the browser does not read the following login main interface
But looking at here, the link feels like the landing was successful. Ask the great God to help see