GithubHelp home page GithubHelp logo

finder's Introduction

Finder (GEO, China Phone, Weather)

快速使用

package main

import (
	"log"

	fd "github.com/20326/finder"
)

func main() {
	// new engine
	engine := fd.NewEngine()

	// register
	engine.Register(fd.KindPhone, fd.NewPhoneFinder("../phone.2004.dat"))

	pf := engine.GetPhoneFinder()
	phoneResult, err := pf.Find("18600228899")
	log.Printf("Phone: %v err: %v", phoneResult, err)

	// unregister
	engine.UnRegister(fd.KindPhone)

	// destroy
	engine.Destroy()
}

性能测试

go test -v --bench="."

手机号归属地查询

最新最全的**境内手机号归属地信息库查询工具

手机号归属地数据打包工具

手机号归属地数据格式

    | 4 bytes |                     <- phone.dat 版本号(如:1701即17年1月份)
    ------------
    | 4 bytes |                     <-  第一个索引的偏移
    -----------------------
    |  offset - 8            |      <-  记录区
    -----------------------
    |  index                 |      <-  索引区
    -----------------------
  1. 头部为8个字节,版本号为4个字节,第一个索引的偏移为4个字节;
  2. 记录区 中每条记录的格式为"<省份>|<城市>|<邮编>|<长途区号>\0"。 每条记录以'\0'结束;
  3. 索引区 中每条记录的格式为"<手机号前七位><记录区的偏移><卡类型>",每个索引的长度为9个字节;

手机号归属地数据更新(phone.2004.dat)

  • 归属地信息库文件大小:4,040,893 字节
  • 归属地信息库最后更新:2020年04月
  • 手机号段记录条数:447893

GEO数据库 ip2region.db

https://github.com/lionsoul2014/ip2region/raw/master/data/ip2region.db

License

Copyright (c) 2020 (brian)

Licensed under the MIT license (LICENSE).

finder's People

Contributors

20326 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.