WeChat public platform development (43) train time query

Source: Internet
Author: User

Public platform development public platform development mode enterprise public platform train ticket interface train time interface train Review
Author: Fang Times studio
Original article: http://www.cnblogs.com/txw1958/p/weixin-43-train.html

 

I. Train query interface

Go to Baidu to find the interface

http://train.qunar.com/qunar/checiInfo.jsp?ex_track==t110=json=123456=1373813217828=XQScript_5

Q is the vehicle count
Server is the current timestamp in milliseconds
Cityname is 123456 for review

 

Ii. result data

 

 

Iii. Source Code

<?(getTrainInfo("t110" getTrainInfo( =  (" ",  = ([1].([0]*1000 = "http://train.qunar.com/qunar/checiInfo.jsp?ex_track=&q=".."&format=json&cityname=123456&ver=".."&callback=XQScript_5" = "User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:14.0) Gecko/20100101 Firefox/14.0.1",        "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",        "Accept-Language: en-us,en;q=0.5",                "Referer: http://train.qunar.com/list_num.htm?fromStation=". =, CURLOPT_URL, , CURLOPT_RETURNTRANSFER, 1, CURLOPT_HTTPHEADER,  = curl_exec( ?>

 

Iv. Legacy issues

The returned data is not arranged in order ......
Algorithm to be sorted again

 

 

 

 

Related Article

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.