Vehicle violation query demo

Source: Internet
Author: User

Vehicle violation query demo

Using system;

Using system. Collections. Generic;

Using system. LINQ;

Using system. text;

Using system. net. Security;

Using system. Security. cryptography. x509certificates;

Using system. net;

Using system. IO;

Using system. Io. compression;

Using system. Text. regularexpressions;

Using system. Web. Script. serialization;

Namespace weizhang

{

Class Program

{

Static void main (string [] ARGs)

{

String city = "********"; // city code *

String hphm = "**********"; // a complete 7-digit number *

String hpzl = "02"; // Number of the plate type (refer to the plate type interface )*

String engineno = "*******"; // engine number (based on parameters in the city Interface)

String key = "**********************"; // applied key value

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

Supported format: JSON

HTTP Request Method: Get post

Demo: http://apis.haoservice.com/weizhang/query? City = ******** & hphm = ********* & hpzl = 02 & engineno = **

Return example:

{

"Error_code": "0 ",

"Reason": "successful return ",

"Result ":

{

"Province ":"*****",

"City ":"**********",

"Hphm ":"*********",

"Hpzl": "02 ",

"Lists ":

[

{

"Date ",

"Area": "wenyuan Street south ",

"Act": "If a motor vehicle other than a medium-sized or higher passenger-carrying vehicle or hazardous goods transport vehicle is driving more than 20% times per hour ",

"Code": "1352 ",

"Fen": "3 ",

"Currency": "200 ",

"Handled": "unprocessed ",

"Payno": "067900104603 ",

"Longpolling": "112.737809 ",

"Latitude": "37.710136"

}

]

}

}


Note:

For a vehicle violation query, you must first have a key value, and then enter the city code, number plate number, and number of the number plate type you want to query in sequence;

If an error occurs, view the code table on this web page (http://www.haoservice.com/docs/2/query.


Vehicle violation query demo

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.