I usually just build Wordpress websites. But because i know HTML and PHP basics I have been kindly asked to help out a friend with his idea.
Idea (In Short)
In the UK each vehicle has a registration number, this number is connected to a database called "DVLA". His idea is when you search a correct registration number, you will receive information on the vehicle relating to the registration number.
Access to the DVLA Database He has been granted access to this database, with a username and password. I was hoping there would be some sample data that i just put on his web hosting and it would work (But no!). The only help, or snippet of code i get is this:
HTTP GET
The following is a sample HTTP GET request and response. The placeholders shown need to be replaced with actual values.
GET /capdvla_webservice/http://ift.tt/1J86pg8 HTTP/1.1
Host: webservices.capnetwork.co.uk
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0"?>
xml
HTTP POST
The following is a sample HTTP POST request and response. The placeholders shown need to be replaced with actual values.
POST /capdvla_webservice/http://ift.tt/1yFJ0mQ HTTP/1.1
Host: webservices.capnetwork.co.uk
Content-Type: application/x-www-form-urlencoded
Content-Length: length
SubscriberID=string&Password=string&vrm=string
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0"?>
xml
After i enter my ID and Password (To verify reg look-up), i enter the VRM - this is the registration number that we want to check the details of. The form gives me a XML document with all the vehicles data.
The Big Question
I have been searching none stop how to pull external XML from the DVLA an place the results to an online user who has entered their vehicle registration number, but i am getting know where, this is pretty much my last resort.
How do i get a user to enter there reg, link up with the DVLA database, and for the user to receive the information in bog standard HTML
No comments:
Post a Comment