17 Jan
VIN API - PHP and XML Parsing
Thanks go to Michael for sharing his hard work with the rest of you VIN API and PHP developers ![]()
I hope this helps -
Thanks go to Michael for sharing his hard work with the rest of you VIN API and PHP developers ![]()
I hope this helps -
Copyright 2009, powered by WordPress
Hi Guys, this is fantastic stuff! Could you please show where in the above PHP implementation I would indicate the “complete = true;” option? Would I need to remove the array for this to work?
Sorry I just saw examples of how to return all variables in Ruby and Windows Server implementations, but didn’t catch a PHP way to return ALL xml variables available.
Also, one other question, I did get a working test going and tried multiple very popular manufacturers and models of cars but basic things like the “Transmission:” type never came back for me, even though they were listed in the above code example. Do you find this common or perhaps was there a code issue?
Thanks in advance! If I can get this running well I will have someone willing to continually buy VINs from you haha.
1) add ?complete=true, like this:
curl_setopt ($curl, CURLOPT_URL, ‘http://vinapi.skizmo.com/vins/’.$vin.’.xml?complete=true’);
2) Interesting, I’d like to take a look, please send me an email with the VINs that did not return transmission data - support at mrquotey dot com
Great
Page, to go through all of the items returned in the XML, you’ll need to parse it. There are a few libraries to do this. I use SimpleXMLElement:
$e = new SimpleXMLElement($this->xml);
foreach($e->children() as $item) {
$name = $item->getName();
$value = (string)$item;
}
Thank you both, that is a great help in understanding this a bit more!
I want to use vinapi on my site. Can anyone help me?
Sure - are you having a specific problem? What language are you working with? Are you a developer?
I want to use php. I’m a not a developer. I dont know how can I start this script. I want to buy vin packages and use on my site to decode vins for check auto parts compatibility.
You can find a php example here - http://vinapi.skizmo.com/examples
Hi,
i need to get an API key to be able to use the VIN decoder, what do i have to do to get one
Thanks
Hey Ron -
Starting from http://vinapi.skizmo.com, there is a signup link in the upper-right of the page.
This link will take you here - http://vinapi.skizmo.com/signup
After signing up, you’ll get your API key and 20 free VINs with which to test.
After that, you can take a look at the packages and prices of what we offer - http://vinapi.skizmo.com/packages_and_pricing
If you have any questions, just let me know,
- Charlie