I want to simulate logon to my school's educational administration system. I have failed.

Source: Internet
Author: User
I want to simulate logon to my school's educational administration system. if I fail to log on to my school's educational administration system, visit 210.35.72.21: 8888eduindex.html & nbsp; (on the left side of the logon box) user name: 1101002 password: 1101002s recently practiced simulated login, so I wrote a simulated login section to log on to the educational administration system. I want to give it a try, but I have never been able to log on successfully. So I 'd like to ask a question. what is the problem? Thank you! & Lt; h I want to simulate logon to my school's educational administration system, but I failed.
Educational Administration System website: http: // 210.35.72.21: 8888/edu/index.html (the logon box is on the left)
Username: 1101002
Password: 1101002 s

I have been practicing simulated logon recently, so I wrote a paragraph to simulate logon to the educational administration system. I want to give it a try, but I have never been able to log on successfully. So I 'd like to ask a question. what is the problem?

Thank you!









$ Cookie_file = tempnam ('./temp', 'cooker ');
$ Login_url = 'http: // 210.35.72.21: 8888/edu/student/login. do? Messageflag = true ';
$ Post_fields = 'username = 1101002 & password = 1101002s ';

// Log on and obtain the cookie
$ 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 );
Echo $ text = curl_exec ($ ch );
Curl_close ($ ch );

Echo' ';

// Load a page using cookies
$ Url = 'http: // 210.35.72.21: 8888/edu/student/historySchedule. do ';
$ Ch = curl_init ($ url );
Curl_setopt ($ ch, CURLOPT_HEADER, 0 );
Curl_setopt ($ ch, CURLOPT_RETURNTRANSFER, 1 );
Curl_setopt ($ ch, CURLOPT_COOKIEFILE, $ cookie_file );
Echo $ text = curl_exec ($ ch );
Curl_close ($ ch );

?>



------ Solution --------------------
Whether other parameters need to be passed in the header.
Mark it. go back and I'll test it.
------ Solution --------------------
1. log on to the "course selection center" homepage, enter the student ID and password, and click the "course selection and exit" menu at the top.
Apparently you are not logged on
------ Solution --------------------
Are you sure you only have two parameters: user name and password? Student, what about the instructor parameter?
You need to log on to the system to capture packets. you can use firebug.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.