当前位置: 首页 > >

php 车牌号限号,车辆尾号限行

发布时间:

package api.jisuapi.vehiclelimit;


import api.util.HttpUtil;


import net.sf.json.JSONArray;


import net.sf.json.JSONObject;


public class Query {


public static final String APPKEY = "your_appkey_here";// 你的appkey


public static final String URL = "https://api.jisuapi.com/vehiclelimit/query";


public static final String city = "hangzhou";// 城市


public static final String date = "2015-12-02";// 时间


public static void Get() {


String result = null;


String url = URL + "?appkey=" + APPKEY + "&city=" + city + "&date=" + date;


try {


result = HttpUtil.sendGet(url, "utf-8");


JSONObject json = JSONObject.fromObject(result);


if (json.getInt("status") != 0) {


System.out.println(json.getString("msg"));


} else {


JSONObject resultarr = json.optJSONObject("result");


String city = resultarr.getString("city");


String cityname = resultarr.getString("cityname");


String date = resultarr.getString("date");


String week = resultarr.getString("week");


String area = resultarr.getString("area");


String summary = resultarr.getString("summary");


String numberrule = resultarr.getString("numberrule");


String number = resultarr.getString("number");


System.out.println(city + " " + cityname + " " + date + " " + week + " " + area + " " + summary + " "


+ numberrule + " " + number);


JSONArray time = resultarr.optJSONArray("time");


for (int i = 0; i < time.size(); i++) {


System.out.println(time.get(i));


}


}


} catch (Exception e) {


e.printStackTrace();


}


}


}







相关资源:2020深圳杯C题.docx



友情链接: hackchn文档网 营销文档网 爱linux网 爱行业网 时尚网