基于php的火车时刻表接口调用代码实例
代码描述:基于php的火车时刻表接口调用代码实例
代码平台:聚合数据
// +----------------------------------------------------------------------
//----------------------------------
// 火车时刻表调用示例代码-聚合数据
// 在线接口文档:http://www.doczj.com/doc/0ead136665ce0508773213a0.html/docs/79
//----------------------------------
header('Content-type:text/html;charset=utf-8');
//配置您申请的appkey
$appkey= "*********************";
//************1.列次查询************
$url= "http://www.doczj.com/doc/0ead136665ce0508773213a0.html/onebox/train/query";
$params= array(
"train"=> "",//车次号,如:D3010
"key"=> $appkey,//应用APPKEY(应用详细页查询)
);
$paramstring= http_build_query($params);