Giter Site home page Giter Site logo

qqwry's Introduction

QQWry

纯真IP库 golang 版

有关纯真IP库的文档详见 http://lumaqq.linuxsir.org/article/qqwry_format_detail.html

1. 依赖

  • mahonia 处理 GBK 编码的地址信息 (请确保先装好 hg)
go get code.google.com/p/mahonia

update:

go get github.com/yinheli/mahonia
  • 纯真 IP 库

下载地址 http://update.cz88.net/soft/qqwry.rar

2. 使用

  • 下载
go get github.com/yinheli/qqwry
  • 在项目中引入
import (
	"github.com/yinheli/qqwry"
	"log"
)

func main() {
	q := qqwry.NewQQwry("qqwry.dat")
	q.Find("180.89.94.90")
	log.Printf("ip:%v, Country:%v, City:%v", q.Ip, q.Country, q.City)
	// output: 
	// 2014/02/22 22:10:32 ip:180.89.94.90, Country:北京市, City:长城宽带
}

3. 使用注意

  • qqwry 不是线程安全的
  • qqwry 没有使用缓存

4. license

Licensed under MIT.

qqwry's People

Contributors

yinheli avatar

Watchers

James Cloos avatar jz 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.