buibr/hlrlookup

There is no license information available for the latest version (v1.0) of this package.

Lookup phone number for validity in hlrlookup.com

v1.0 2019-06-06 14:05 UTC

This package is auto-updated.

Last update: 2024-04-14 00:44:09 UTC


README

Lookup phone numbers from hlrlookup.com

Install

composer require buibr/hlrlookup
"buibr/hlrlookup": "dev-master"

Usage Single Lookup

use buibr\HLR\Single;

$config = new buibr\HLR\HlrApi(['apikey'=>'','password'=>'']);
$lookup = new Single( $config );
$object = $lookup->check('38971789062');

Usage Bulk Lookup

use buibr\HLR\Bulk;

$config = new HlrApi(['apikey'=>'','password'=>'']);
$lookup = new Bulk( $config );

$batch      = $lookup->submit(true, ['38971789062', '38971789062', '38971789062']);

while(true){

    $status     = $lookup->status($batch);

    if($status->getStatus() === 'complete'){
        $download   = $lookup->download($batch);

        foreach($download->getData() as $record) {
            ....
        }

        break;
    }

    sleep(1);
}