1. Go to this page and download the library: Download amattu2/nhtsa-wrapper 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/ */
amattu2 / nhtsa-wrapper example snippets
/**
* Decode a 17-digit VIN
*
* @param string vin number
* @param ?integer model year
* @return ?array raw NHTSA result
* @throws TypeError
* @author Alec M. <https://amattu.com>
* @date 2021-04-04T16:19:40-040
*/
/**
* Get vehicle recalls by Year, Make, Model
*
* @param int model year
* @param string make
* @param string model
* @return ?array NHTSA raw result
* @throws TypeError
* @author Alec M. <https://amattu.com>
* @date 2021-04-04T16:48:24-040
*/
/**
* Parse a raw recall result
*
* @param array raw recall result
* @return ?array parsed recall result
* @throws TypeError
* @author Alec M. <https://amattu.com>
* @date 2021-04-04T18:16:26-040
*/
/**
* Get all available models for a make by year
*
* @note This is a free-text match. Recommend using `getModelsForMakeIdByYear`
* @param int $year The model year
* @param string $make The make
*/