PHP code example of abstractapi / php-phone-validation
1. Go to this page and download the library: Download abstractapi/php-phone-validation 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/ */
abstractapi / php-phone-validation example snippets
// Verify phone using Abstract's Phone Validation and Verification API and PHP
$api_key = "YYYYYY"; // Your API Key from https://app.abstractapi.com/api/phone-validation/documentation
Abstractapi\PhoneValidation\AbstractPhoneValidation::configure($api_key);
$info = Abstractapi\PhoneValidation\AbstractPhoneValidation::verify('+14152007986');
print $info->country->code;
bash
composer
bash
php vendor/bin/phpunit