PHP code example of koteeki / yii2-clearoutphone
1. Go to this page and download the library: Download koteeki/yii2-clearoutphone 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/ */
koteeki / yii2-clearoutphone example snippets
return [
'components' => [
'clearoutphone' => [
'class' => \koteeki\clearoutphone\ClearoutPhone::class,
'token' => 'YOUR_TOKEN_HERE',
'timeout' => 5000,
],
],
];
use koteeki\clearoutphone\ClearoutPhone;
use koteeki\clearoutphone\exceptions\ClearoutPhoneException;
try {
/** @var ClearoutPhone $clearout */
$clearout = \Yii::$app->clearoutphone;
$phoneDetails = $clearout->getPhoneDetails('+13024401582');
if ($phoneDetails->isValid) {
// your magic here
}
} catch (ClearoutPhoneException $e) {
Yii::error($e->getMessage());
}
php composer.phar