« links for 2005-03-29 | Main | thunderbird + gnupg + enigmail 安全email新方案 »

awstats 显示来访者位置的插件 qqhostinfo

awstats是一个极好用的网站访问日志统计工具,它可以统计每天/每月的访问量,大家通过哪些搜索引擎,搜的什么关键字才来到你的网站的. 访问你的人都来自那些IP,那些国家,使用什么浏览器等等。 使用这样的工具,你就能更好的把握你的网站的用户群的爱好,呵呵

这次,我介绍一下显示来访者地区的插件。awstats是可以增加插件的。我做的这个qqhostinfo插件,可以在访问主机表格中增加一列,显示ip对应的位置。当然这个资料来源于著名的QQWry.Dat文件。上一篇blog我介绍了一个用perl脚本写的查询ip地址位置的程序。刚好,awstats的插件也需要perl来写。
1。首先,点击这里下载插件。把它放在awstats/wwwroot/cgi-bin/plugins中。

2.下载上一篇blog提到的分析QQWry.dat的perl脚本。放在同一目录。

3。去网上下载QQWry.Dat放在同一目录中,注意文件名一定要是QQWry.Dat

4。编辑你得awstats配置文件,大概在LoadPlugin="hostinfo"的后面增加一行


LoadPlugin="qqhostinfo"

现在,应该就好了。效果大概是这样的。 (Location这一列)

qqhostinfo-demo.png

广告

TrackBack

Listed below are links to weblogs that reference awstats 显示来访者位置的插件 qqhostinfo:

» awstats 显示来访者位置的插件 qqhostinfo from Lendy's Blog
<p><a href="http://awstats.sourceforge.net/">awstats</a>是一个极好用的网站访问日志统计工具,它可以统计每天/每月的访问量,大家通过哪些搜索引擎,搜的什么关键字才来到你的... [Read More]

Comments

必须打开geoipfree这个插件吗?
可是我打开它总是提示错误
Error: Plugin load for plugin 'geoipfree' failed with return code: Error: Can't locate Geo/IPfree.pm in @INC (@INC contains: D:/Perl/lib D:/Perl/site/lib

我是不是需要去下载一个IPFREE.PM这个文件?我不知道去哪里可以下载到?

不知道为什么,我按照说的增加了插件 qqhostinfo,可是Location一直都是空

另外,为什么看不到别人的评论呢?

备注:
一直没有成功,只能在 /usr/local/awstats/wwwroot/cgi-bin/plugins 目录下成功,发现是文件地址设置错误,处理方法
修改 qqwry.pl 文件,将
my $ipfile="./QQWry.Dat";
改为:
my $ipfile="${DIR}/plugins/QQWry.Dat";
当然,你的QQWry.Dat文件是在 /usr/local/awstats/wwwroot/cgi-bin/plugins 下的。
希望对你有用。

备注:
一直没有成功,只能在 /usr/local/awstats/wwwroot/cgi-bin/plugins 目录下成功,发现是文件地址设置错误,处理方法
修改 qqwry.pl 文件,将
my $ipfile="./QQWry.Dat";
改为:
my $ipfile="${DIR}/plugins/QQWry.Dat";
当然,你的QQWry.Dat文件是在 /usr/local/awstats/wwwroot/cgi-bin/plugins 下的。
希望对你有用。

老大,我的locate搞完以后变成4个点了。是什么状况啊。谢谢!

你好 看了您得安装方法 和 评论内的内容 可是还是不行 不知为什么 我的qq:195766840 msn:gundan2000@hotmail.com
能否给与指导?

谢谢,用上了,什么都不用改,把QQWry.Dat传到cgi-bin目录下就行了

将其中的qqwry.dat文件拷贝到cgi-bin目录下,试试看

还是搞不出来哦

确实要换成绝对路径才可以

找到问题了,是因为qqhostinfo.pm中调用qqwry.pl的路径有问题,没有找到qqwry.pl文件,自然也就无法输出了。
将qqhostinfo.pm文件中
require "${DIR}/plugins/qqwry.pl";
修改为你存放的路径就会正常输出,我的系统是windows2003+IIS6
大家可以做个参考

我的也是location那一列没有显示!!
不知道哪里有问题

我用了您的那个插件,可是跟ysumadwang一样,location那一列没有显示!!

to ysumadwang :
没错,三个都是放在plugins目录下的

用了您的那个插件,可是location那一列没有显示
我现在qqwry.dat,用与其配套的工具可以查看到ip来源.
是否所有您提供的文件直接放在awstats/wwwroot/cgi-bin/plugins下就可以了/;QQWry.Dat,分析的脚本文件,和qqhostinfo.pm

然后加入 LoadPlugin="qqhostinfo"

我现在调用你那个qqwry.pl,那个qqhostinfo.mp的包在windows下也需要用perl manager安装吗?如需要怎样运行啊?

我是再windows下执行

运行了IPFREE结果出来的不是很全,运行GEOIP总是报错

to Jino:
没错,是LoadPlugin="geoipfree"
不过它依赖于Geo::IPfree这个perl模块
配置文件的注释里写的比较清楚

# Plugin: GeoIPfree
# Perl modules required: Geo::IPfree version 0.2+ (from Graciliano M.P.)
# Country chart is built from an Internet IP-Country database.
# This plugin is useless for intranet only log files.
# Note: You must choose between using this plugin (need Perl Geo::IPfree module)
# or the GeoIP plugin (need Perl Geo::IP module from Maxmind).
# This plugin reduces AWStats speed of 10% !
#

加上LoadPlugin="geoip"或LoadPlugin="geoipfree"?

to xiangfei:
解析主机名是需要dns解析的,需要在配置文件中打开 DNSLookup=1
to Jino:
希望统计国家信息的话,需要打开geoipfree或geoip这个插件,这是awstats自带的

文件路径需要改吗?!国家都没有出来啊!!!

你的主机名怎么解析的,我的怎么一个都解析不了,我的qq:106375263 msn:xiangfeilulu@hotmail.com

我发现需要把QQWry.Dat qqwry.pl拷贝到cgi-bin/才能工作。

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)