Go-Home (a software for ticket booking for 12306 train tickets) Source Code Analysis

Source: Internet
Author: User

Project address: http://code.google.com/p/go-home/, source code svnaddress: http://go-home.googlecode.com/svn/trunk/

The old ticket booking software last year may have expired, but I just learned the basic ticket booking process to facilitate the study of other ticket booking scripts.

Basic flowchart:

1. Obtain the image Verification Code

Submit request to https://dynamic.12306.cn/otsweb/passCodeAction.do? Rand = sjrand,

2. Obtain the random number used for login,

Submit request to https://dynamic.12306.cn/otsweb/loginAction.do? Method = loginaysnsuggest,

3. log on and submit the request to the supervisor.

COOKIE: JSESSIONID = 6009b4610f436d8023126256fb598bdd; bigipserverotsweb = 2413035786.48160.0000

4. query the qualified vehicle count information,

Submit request to https://dynamic.12306.cn/otsweb/order/querySingleAction.do,

5. Judge the queried vehicle count information, find the appropriate vehicle count, and check whether there is a proper seat,

6. reserve a ticket and submit your request

Https://dynamic.12306.cn/otsweb/order/querySingleAction.do? Method = submutorderrequest,

7. Get the token and submit the request

Https://dynamic.12306.cn/otsweb/order/querySingleAction.do? Method = init

8. Get the token, submit the order, and submit the request

Https://dynamic.12306.cn/otsweb/order/confirmPassengerAction.do? Method = confirmpassengerinfosingle

9. query the order status. Submit a request

Https://dynamic.12306.cn/otsweb/order/myOrderAction.do? Method = querymyordernotcomplete

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.