WeChat public platform Development (43) Train time Query _php tutorial

Source: Internet
Author: User
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 ...

  • 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.