PHP code example of hejunjie / mobile-locator
1. Go to this page and download the library: Download hejunjie/mobile-locator 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/ */
hejunjie / mobile-locator example snippets
use Hejunjie\MobileLocator\MobileLocator;
// Look up a phone number's carrier and location
$info = MobileLocator::getCarrierInfo('16601750925');
print_r($info);
// Array
// (
// [province] => 上海
// [city] => 上海
// [isp] => 联通
// )
[
'province' => '上海', // Province
'city' => '上海', // City
'isp' => '联通', // Carrier / ISP
]