943,563 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Marked Solved
  • Views: 3916
  • PHP RSS
You are currently viewing page 1 of this multi-page discussion thread
Jun 1st, 2008
-1

Help building VIN decoding website

Expand Post »
Hello everyone, I've been trying to build a website with a VIN decoder for a few weeks now and I'm getting no where. I have no experience with PHP but have been doing a lot of reading. My question is how do I split a form into different pieces that can be decoded seperately. For instance: VIN is 4H27F2G111111. I want to take 4 and decode it; H decode it; 27 decode; F decode; 2 decode; G decode; 111111 decode. I haven't been able to learn how to do this and I've been searching for quite some time. If anyone knows how I can accomplish this, I'd be extremely grateful!

Thank you,
Arthur Ash III
Reputation Points: 10
Solved Threads: 0
Newbie Poster
forwardlookguy is offline Offline
23 posts
since Jun 2008
Jun 1st, 2008
0

Re: Help building VIN decoding website

i don't think it would be hard, but i don't know much about how vin numbers are formatted. is it the same format each time, if so it won't be hard.
Reputation Points: 235
Solved Threads: 193
Nearly a Posting Virtuoso
kkeith29 is offline Offline
1,315 posts
since Jun 2007
Jun 1st, 2008
0

Re: Help building VIN decoding website

Hey Keith, thanks for the response. The format depends on the make of the car but they are standardized for each make or year range. For example, the VIN format I posted above would be correct for all 1972-1980 GM vehicles. If I had code to work with, I could then adopt it to work with the other formats. I'm glad you said it will be easy because so far I've tried a lot to no avail.

Thanks,
Arthur
Reputation Points: 10
Solved Threads: 0
Newbie Poster
forwardlookguy is offline Offline
23 posts
since Jun 2008
Jun 1st, 2008
0

Re: Help building VIN decoding website

Are you doing this for experience or for something else? As if you use google, there are some already out there.
Download, look at the code, and play with it from there...
http://webscripts.softpedia.com/scri...der-28375.html
Vai
Reputation Points: 12
Solved Threads: 5
Junior Poster in Training
Vai is offline Offline
74 posts
since Jan 2008
Jun 1st, 2008
0

Re: Help building VIN decoding website

I've seen that before but I was wanting to make my own. It will focus on old cars. That VIN decoder only does the newer 17-digit VINs which means only cars from 1981-present can be decoded. There's isn't a place out there that has a VIN decoder that will decode ALL old car VIN's and that's what I'm aiming for.

Thanks,
Arthur
Reputation Points: 10
Solved Threads: 0
Newbie Poster
forwardlookguy is offline Offline
23 posts
since Jun 2008
Jun 3rd, 2008
0

Re: Help building VIN decoding website

Can anyone help me here? Supposedly it's not hard so someone has to know!
Reputation Points: 10
Solved Threads: 0
Newbie Poster
forwardlookguy is offline Offline
23 posts
since Jun 2008
Jun 3rd, 2008
0

Re: Help building VIN decoding website

pretty much use substr() to get the values you need. then run that string through the database to find the value they stand for. pretty simple.
Last edited by kkeith29; Jun 3rd, 2008 at 1:49 am.
Reputation Points: 235
Solved Threads: 193
Nearly a Posting Virtuoso
kkeith29 is offline Offline
1,315 posts
since Jun 2007
Jun 3rd, 2008
0

Re: Help building VIN decoding website

I get what you are saying but I've not been using PHP for long and I don't know how to implent this into my code. Is there anyway you could give me an example using the VIN format I listed above? When you say database, do you mean SQL? I wasn't planning on using a database but I could make one if that would be best. Is there a way to write the variables into the PHP code or is it best to use a database?

Thank you,
Arthur Ash III
Reputation Points: 10
Solved Threads: 0
Newbie Poster
forwardlookguy is offline Offline
23 posts
since Jun 2008
Jun 3rd, 2008
0

Re: Help building VIN decoding website

i was thinking of using a database (mysql,ect.) to store the meanings of each piece of the vin number. (for decoding the vin) i don't know the specifics so this may not be needed.

PHP Syntax (Toggle Plain Text)
  1. $vin = '4H27F2G111111';
  2. $part1 = substr($vin,0,1);//returns 4
  3. $part2 = substr($vin,1,1);//returns H
  4. $part3 = substr($vin,2,2);//returns 27
  5. //i think you can figure the rest out.
  6.  
  7. //after you get each piece. run them through a database to find what they stand for.
Reputation Points: 235
Solved Threads: 193
Nearly a Posting Virtuoso
kkeith29 is offline Offline
1,315 posts
since Jun 2007
Sep 24th, 2008
0

Re: Help building VIN decoding website

Did you figure it out? if so is the decoder for sale?
Reputation Points: 10
Solved Threads: 0
Light Poster
Iternal is offline Offline
35 posts
since Jul 2006

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Can I use echo to place data at a certain location on my web page
Next Thread in PHP Forum Timeline: Major problems with queries





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC