This action will force synchronization from xluohome/phonedata, which will overwrite any changes that you have made since you forked the repository, and can not be recovered!!!
Synchronous operation will process in the background and will refresh the page when finishing processing. Please be patient.
基于GO语言实现,使用二分查找法。
| 4 bytes | <- phone.dat 版本号(如:1701即17年1月份)
------------
| 4 bytes | <- 第一个索引的偏移
-----------------------
| offset - 8 | <- 记录区
-----------------------
| index | <- 索引区
-----------------------
vi test.go
package main
import (
"fmt"
"github.com/xluohome/phonedata"
)
func main() {
pr, err := phonedata.Find("18957509123")
if err != nil {
panic(err)
}
fmt.Print(pr)
}
go run test.go
PhoneNum: 18957509123
AreaZone: 0575
CardType: 中国电信
City: 绍兴
ZipCode: 312000
Province: 浙江
cmd 目录下phonedata是一个命令行查询手机号归属地信息的终端程序。
Linux:
#PHONE_DATA_DIR=../ ./phonedata 18957509123
Windows:
>set PHONE_DATA_DIR=../
>phonedata.exe 18957509123
stdout:
PhoneNum: 18957509123
AreaZone: 0575
CardType: 中国电信
City: 绍兴
ZipCode: 312000
Province: 浙江
Thinkpad s3 (Intel(R) Core(TM) i5-4200U CPU @ 1.60GHz)
go test -v --bench="."
BenchmarkFindPhone-4 2000000 710 ns/op
好。下载地址 https://git.oschina.net/oss/phonedata/attach_files
python: https://github.com/lovedboy/phone
php : https://github.com/shitoudev/phone-location , https://github.com/iwantofun/php_phone
php ext: https://github.com/jonnywang/phone
java: https://github.com/fengjiajie/phone-number-geo
Node: https://github.com/conzi/phone
C++: https://github.com/yanxijian/phonedata
C##: https://github.com/sndnvaps/Phonedata
手机号归属地信息是通过网上公开数据进行收集整理。
对手机号归属地信息数据的绝对正确,我不做任何保证。因此在生产环境使用前请您自行校对测试。
@lovedboy https://github.com/lovedboy
@zhengji https://github.com/zheng-ji/gophone
欢迎来信交流 phposs@qq.com , QQ群 309020981
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。