Coder Social home page Coder Social logo

Comments (4)

sndnvaps avatar sndnvaps commented on July 17, 2024

@54huige
需要定义PHONE_DATA_DIR这个环境变量,才行,在这个变量的目录里面,需要放置phone.dat文件
如果不想设置变量,可以直接修改源代码的https://github.com/xluohome/phonedata/blob/master/phonedata.go#L53

func init() {
        //注释掉这几行
	//dir := os.Getenv("PHONE_DATA_DIR")
	//if dir == "" {
		//_, fulleFilename, _, _ := runtime.Caller(0)
		//dir = path.Dir(fulleFilename)
	//}
	var err error
	content, err = ioutil.ReadFile("/root/phone.dat") //在这里直接修改为你的dat文件路径,
	if err != nil {
		panic(err)
	}
	total_len = int32(len(content))
	firstoffset = get4(content[INT_LEN : INT_LEN*2])
}

from phonedata.

sndnvaps avatar sndnvaps commented on July 17, 2024

@sndnvaps @xluohome 强烈建议增加360接口号段数据, 因为360接口数据较为准确, (虽然一些免费接口号段数据量不会很多) 曾用360号段数据进行过对比, 发现还是360号段归属地准确

这得找@xluohome才行

from phonedata.

xluohome avatar xluohome commented on July 17, 2024

from phonedata.

Related Issues (20)

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.