車輛違章查詢演示示例
using System;
using System.Text;
using System.Net;
namespace weizhang
{
class PRogram
{
static void Main(string[] args)
{
string city = "********";// 城市代碼 *
string hphm = "********";// 號牌號碼 完整7位 *
string hpzl = "02";//號牌種類編號 (參考號牌種類接口)*
string engineno = "********";//發動機號 (根據城市接口中的參數填寫)
string key = "**********************";//申請的key值
string url = "http://apis.haoservice.com/weizhang/query?city="+city+"&hphm="+hphm+"&hpzl="+hpzl+"&engineno="+engineno+"&key="+ key;
WebClient wc = new WebClient();
wc.Encoding = Encoding.UTF8;
string str = wc.DownloadString(url);
Console.WriteLine(str);
Console.ReadKey();
}
}
}
URL:http://apis.haoservice.com/weizhang/query
支持格式:json
http請求方式:GET POST
DEMO:http://apis.haoservice.com/weizhang/query?city=GZ_GuiYang&hphm=*******&hpzl=02&engineno=***
返回示例:
{
"error_code": "0",
"reason": "成功返回",
"result":
{
"province": "***",
"city": "***********",
"hphm": "*****",
"hpzl": "02",
"lists":
[
{
"date": "2013-10-06 09:50",
"area": "文苑街南",
"act": "駕駛中型以上載客載貨汽車、危險物品運輸車輛以外的其他機動車行駛超過規定時速未達20%的",
"code": "1352",
"fen": "3",
"money": "200",
"handled": "未處理",
"PayNo":"067900104603",
"longitude": "112.737809",
"latitude": "37.710136"
}
]
}
}
備注: 車輛違章查詢,要先有key值,然后將自己想要查詢的城市代碼,號牌號碼,號牌種類編號等依次輸入; 若出現錯誤,請查看該網頁(http://www.haoservice.com/docs/2/query)上的代碼表.
新聞熱點
疑難解答