PHP code example of lyhiving / mobile2location
1. Go to this page and download the library: Download lyhiving/mobile2location 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/ */
lyhiving / mobile2location example snippets
use lyhiving\Mobile\Mobile2Location;
// composer 方式安装
// e2Location.php';
$pl = new Mobile2Location();
$info = $pl->find(13800138000);
print_r($info);
// Output;
Array
(
[province] => 北京
[city] => 北京
[postcode] => 100000
[tel_prefix] => 010
[sp] => 移动
)