1. Go to this page and download the library: Download api-check/php-client 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/ */
api-check / php-client example snippets
use ApiCheck\Api\ApiClient;
$client->setApiKey("YOUR_API_KEY");
// Optionally set a referer if your API key has allowed hosts configured
$client->setReferer("https://your-domain.com");
use ApiCheck\Api\ApiClient;
use ApiCheck\Api\Exceptions\NotFoundException;
use ApiCheck\Api\Exceptions\ValidationException;
use ApiCheck\Api\Exceptions\UnsupportedCountryException;
use ApiCheck\Api\Exceptions\UnauthorizedException;
use ApiCheck\Api\Exceptions\ApiKeyInvalidException;
use ApiCheck\Api\Exceptions\NoExactMatchException;
try {
$address = $client->lookup('nl', ['postalcode' => '2513AA', 'number' => 1]);
} catch (NotFoundException $e) {
// No results found
} catch (ValidationException $e) {
// Invalid or missing fields
} catch (UnsupportedCountryException $e) {
// Country not supported for this operation
} catch (UnauthorizedException $e) {
// Invalid or missing API key
} catch (NoExactMatchException $e) {
// No exact match found (Search API)
} catch (ApiException $e) {
// General API error
}
bash
composer
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.