1. Go to this page and download the library: Download vindecodervehicle/php-sdk 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/ */
vindecodervehicle / php-sdk example snippets
use VinDecoderVehicle\Sdk\VinDecoderClient;
$client = VinDecoderClient::create(
user: 'YOUR_USER',
apiKey: 'YOUR_API_KEY',
);
// Decode a VIN
$vehicle = $client->vin()->decode('WF0GXXGAJ69C71882');
echo $vehicle->getFullName(); // BMW 3 Coupe (E92) 316 i
echo $vehicle->make; // BMW
echo $vehicle->year; // 2007
echo $vehicle->carId; // 55565
// First matching vehicle
$vehicle = $client->vin()->decode('WF0GXXGAJ69C71882');
// All matching vehicles
$vehicles = $client->vin()->decodeAll('WF0GXXGAJ69C71882');
// Engine details
$engines = $client->vin()->getEngines('WF0GXXGAJ69C71882');