Go-home Source Analysis----A train ticket booking software for 12306

Source: Internet
Author: User
This is a creation in Article, where the information may have evolved or changed. Focus on the research and application of open source technology

Go-home Source Analysis----A train ticket booking software for 12306

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

Last year out of a relatively old booking software, now may have failed, just take to learn the basic booking process, convenient for other booking script research.

Basic Flowchart:

1, get the picture verification code

Submit a request to Https://dynamic.12306.cn/otsweb/passCodeAction.do?rand=sjrand,

2, get the random number used when landing, submit the request to

Https://dynamic.12306.cn/otsweb/loginAction.do?method=loginAysnSuggest,

3, user login, submit request to https://dynamic.12306.cn/otsweb/ Loginaction.do, if the login is successful, in the login cookie, there will be Jsessionid and bigipserverotsweb the two information, the two values can be saved, similar to the following example:

COOKIE:JSESSIONID=6009B4610F436D8023126256FB598BDD; bigipserverotsweb=2413035786.48160.0000

4, check the eligible train information,

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

5, the inquiry to the train information to judge, find the appropriate train, see if there is a suitable seat,

6, book tickets, submit the request to

Https://dynamic.12306.cn/otsweb/order/querySingleAction.do?method=submutOrderRequest,

7, get the token, submit the request to

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

8, take the obtained token, submit the order, submit the request to

Https://dynamic.12306.cn/otsweb/order/confirmPassengerAction.do?method=confirmPassengerInfoSingle

9, check the order status. Submit a request to

Https://dynamic.12306.cn/otsweb/order/myOrderAction.do?method=queryMyOrderNotComplete

Author: Cave Court scattered people

Source: http://phinecos.cnblogs.com/

This blog follow Creative Commons Attribution 3.0 License , you are free to reprint for non-commercial purposes, but please retain the original author information and the article link URL.

Category: Program Life Green Channel: Good text to the top attention to my collection this article contact me Phinecos (Cave Court scattered people)
Follow-0
Fans-603+ plus attention 0 0(Please comment on the article) «prev: A simple MongoDB operation class
» Next: Train tickets second kill Raiders

Posted on 2012-12-28 21:35 Phinecos (Dong Ting) read (2055) Comments (0) Edit Collection

Refresh Comment Refresh page back to the top registered users to post a comment, please log in or register to visit the homepage of the website. Blog Park home Bo asked news flash programmer recruitment Knowledge Base Latest IT News:
· Shop 1th and China Postal Savings Bank to enter the internet finance
· Japan still has not decided to regulate Bitcoin in the face of money laundering risk
· Okcoin claims to raise tens of millions of dollars
· And Baidu, a predecessor to eat, was asked Mo Mo Server idle, there is no 30%? I can only ...
· Why didn't the airline make a call outside?
» More News ... Latest Knowledge Base articles:
· Project managers should spend 30% of their time programming
· An IT practitioner's oral English ability growth path
· How We conduct code reviews
· Browsing at your fingertips: how do you understand the user's eye?
· What exactly is node. js?
» More Knowledge Base articles ... Today in history:
2010-12-28 Daily Study notes (12)
2007-12-28 HDU1013 Digital Roots

Powered by:
Blog Park
Copyright Phinecos (People in dongting)

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.