Home > Uncategorized > Car Registration #API now has a home on #Packagist for #PHP #devs

Car Registration #API now has a home on #Packagist for #PHP #devs

 

 

 

 

 

 

 

 

 

Packagist is a public repository for composer packages for PHP, and it makes it super easy to load third party PHP code into your application. So, not to be left out of the game, we’ve submitted our package to Packagist. at the url below

https://packagist.org/packages/infiniteloop/carregistration

You install the package via

composer require infiniteloop/carregistration

Usage

require_once 'vendor/autoload.php';

use carregistration\carregistration;

$conv = new carregistration;

$json = $conv->lookup('***your username***','CheckUSA','H84jae','nj');
print_r($json->Description);    

Parameters

The function “lookup” returns an associative array that differs by country, but maintains consistency where possible. It accepts four parameters, being username, endpoint, registration number and state, in that order.

The username is that which is used on www.vehicleregistrationapi.com

The endpoint specifies the country to be searched, and must be one of the following.

  • Check (UK)
  • CheckBelgium
  • CheckCroatia
  • CheckCzechRepublic
  • CheckDenmark
  • CheckEstonia
  • CheckFinland
  • CheckFrance
  • CheckHungary
  • CheckIndia
  • CheckIreland
  • CheckItaly
  • CheckNetherlands
  • CheckNewZealand
  • CheckNigeria
  • CheckNorway
  • CheckPortugal
  • CheckRussia
  • CheckSlovakia
  • CheckSouthAfrica
  • CheckSpain
  • CheckSriLanka
  • CheckSweden
  • CheckUAE
  • CheckUSA
  • CheckAustralia

The state parameter is only used for USA and Australia, and can be left empty for all other countries.

Advertisement
Categories: Uncategorized
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: