Skip to content

wallaceok/xip

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#xip linux c下基于纯真ip数据库开发的ip查询http形式的server

#先安装libevent2
yum install -y libevent libevent-devel

#安装xip

gcc -Wall -c cjson/cJSON.c  -lm
gcc -Wall -c libqqwry/qqwry.c         
gcc -Wall -c xip.c   -levent -L /usr/local/libevent2/lib/ -I /usr/local/libevent2/include/          
gcc -Wall -o xip qqwry.o cJSON.o xip.o   -levent -L /usr/local/libevent2/lib/ -I /usr/local/libevent2/include/ -lm -liconv        

#运行
./xip -l 192.168.8.21 -p 8020 -P /home/xip/QQWry.Dat -d

#使用
http://192.168.8.21:8020/?type=getip&ip=58.50.20.14

#结果

[qidasheng@master ~]$ curl "http://192.168.8.21:8020/?type=getip&ip=58.50.20.14"
{
	"ip":	"58.50.20.14",
	"address":	"湖北省荆州市沙市区  大学旁洪苑一区珍珍网吧",
	"info":	{
		"code":	200,
		"province":	"湖北省",
		"city":	"荆州市沙市区",
		"desc":	"大学旁洪苑一区珍珍网吧",
		"time":	"0.00006600"
	}
}

About

linux c开发的基于纯真ip数据库的http形式的ip查询server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 99.5%
  • Shell 0.5%