php擴充套件手機號碼歸屬地

NO IMAGE

functions

array|bool phone(string $phone)

install

git clone https://github.com/jonnywang/phone.git
cd phone
phpize
./configure
make
make install

php.ini

extension=phone.so
phone.enable=1
phone.dict_path=/Users/xingqiba/data/softs/phone/phone.dat

example

$result = phone('1367152');
Array
(
[0] => 上海
[1] => 上海
[2] => 200000
[3] => 021
[4] => 1
)

0 省份 1城市 2郵編 3區號 4號碼型別(1移動 2聯通 3電信 4電信虛擬運營商 5聯通虛擬運營商 6移動虛擬運營商)

歡迎您加入我們的專屬QQ討論群組① 233415606 ② 233415756