PHP code example of phillipsdata / vin

1. Go to this page and download the library: Download phillipsdata/vin library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

phillipsdata / vin example snippets


use PhillipsData\Vin\Number;

$vin = new Number('1M8GDM9AXKP042788');

$vin->valid(); // returns whether the VIN is valid
$vin->country(); // returns the ISO 3166 country code for the country of origin
$vin->number(); // returns the VIN number (e.g. 1M8GDM9AXKP042788)
$vin->year(); // returns an array of possible manufacturer years


use PhillipsData\Vin\Number;

$vin = new Number('1M8GDM9AXKP042788', new PhillipsData\Vin\Reader\NorthAmerica());

$reader = $vin->reader(); // returns instance of PhillipsData\Vin\Reader\ReaderInterface