I decided to use the password for each student to log on to the Office of Academic Affairs, even though I did it when I started school.
The first thing to do is to log on to the Office of Academic Affairs, and then open
= ('. /Temp ', 'cookies' = "url" = "uname = Account & upwd = PASSWORD & usertypex = % B9 % DC % C0 % ED % D4 % B1" curl_setopt (, CURLOPT_URL, curl_setopt (, CURLOPT_USERAGENT, 'mozilla/5.0 (compatible; ms ie 9.0; Windows NT 6.1; WOW 64; Trident/5.0; SLCC2 ;. net clr 2.0.50727 ;. net clr 3.0.30729; BRI/2; MASM ;. NET4.0C ;. NET4.0E; InfoPath.3; Media Center PC 6.0; SE 2.X MeTaSr 1.0) 'curl_setopt (, CURLOPT_HEADER, curl_setopt (, scheme, 1 curl_setopt (, scheme, 1 curl_setopt (, CURLOPT_FOLLOWLOCATION, 1 curl_setopt (, CURLOPT_POST, 1 curl_setopt (, CURLOPT_POSTFIELDS, curl_setopt (, CURLOPT_COOKIEJAR, = curl_exec (curl_close ();
The test shows nothing because:
=curl_exec(
It will be explained later. Continue:
= URL 2 "curl_setopt (, CURLOPT_USERAGENT, 'mozilla/5.0 (compatible; ms ie 9.0; Windows NT 6.1; WOW 64; Trident/5.0; SLCC2 ;. net clr 2.0.50727 ;. net clr 3.0.30729; BRI/2; MASM ;. NET4.0C ;. NET4.0E; InfoPath.3; Media Center PC 6.0; SE 2.X MeTaSr 1.0) 'curl_setopt (, CURLOPT_HEADER, 0 curl_setopt (, CURLOPT_URL, curl_setopt (, expires, 1 curl_setopt (, expires, expires, 120 curl_setopt (, signature, 1 curl_setopt (, CURLOPT_POST, 1 curl_setopt (, CURLOPT_POSTFIELDS, curl_setopt (, signature, "Source" curl_setopt (, signature, = curl_exec (curl_close ();
Here, we use the same cookie so that the server can directly identify it.
=curl_exec();
This is the content obtained on the webpage.
();
This is to print the obtained content. If you are careful, you can see the following:
='1';
I commented out such a sentence. This is used to check whether data can be modified. I was unable to modify the obtained data when I first obtained the Course table, and I do not know why, but here we can.
If the account password is wrong, a dialog box like the website will pop up, showing the Account Password error. In this way, you only need to add a student_id in the data table. One account can only be used once.
I really hope that this time I can really stop buying tickets. I am exhausted.
Thanks to the netizens, the verification code of mogujie.com is really good. I will also get it out and share it with you tomorrow. However, the ticket dispenser has a function of entering the verification code manually. This is the same, so I gave up the verification code.
I will be scolded by those people.
Reprinted please indicate the source: http://www.cnblogs.com/yydcdut/p/3472248.html