Public platform Development Public platform development Mode Enterprise public platform train ticket interface train time interface train Trips inquiry
Author: Fang Times studio
Original: http://www.cnblogs.com/txw1958/p/weixin-43-train.html
First, train query interface
Where to find the interface in Baidu
http://train.qunar.com/qunar/checiInfo.jsp?ex_track=< span="">=t110 =json< span=""> < span=""> =123456< span="">=1373813217828=xqscript_5< span="">
Q for Train
Ver is the current millisecond timestamp
CityName by train is 123456
II. Results Data
Third, the 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 (
< span;} Span>?>
Iv. Legacy Issues
The returned data is not in order ...
We need to find a permutation algorithm.
http://www.bkjia.com/PHPjc/440401.html www.bkjia.com true http://www.bkjia.com/PHPjc/440401.html techarticle Public platform Development public Platform Development Mode Enterprise public platform train ticket interface train time interface train trips query author: Fang Times Studio Original: HTTP://WWW.CNB ...