PHP code example of restugbk / get-contact

1. Go to this page and download the library: Download restugbk/get-contact 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/ */

    

restugbk / get-contact example snippets


use Restugbk\GetContact;

$token    = 'YOUR_TOKEN';
$finalKey = 'YOUR_FINAL_KEY';

$getContact = new GetContact($token, $finalKey);

$number = '081234567890';

$response = $getContact->checkNumber($number);

if ($response['success']) {
    echo "Validated Number: " . $response['number'] . "\n";
    echo "Tags: " . implode(', ', $response['tags']) . "\n";
} else {
    echo "Error: " . $response['message'] . "\n";
}

$number = '081234567890';

$response = $getContact->searchNumber($number);

if ($response['success']) {
    echo "Validated Number: " . $response['number'] . "\n";
    echo "Profile: " . implode(', ', $response['profile']) . "\n";
} else {
    echo "Error: " . $response['message'] . "\n";
}