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 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!
'; // Use cookies to load a page $ 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);?>
Reply to discussion (solution)
Whether other parameters need to be passed in the header.
Mark it. go back and I'll test it.
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.
It is my own problem. The first login address is found incorrectly, and the second parameter is submitted less. Thank you!