From: eldy <>
Date: Sat, 30 Mar 2002 14:04:13 +0000 (+0000)
Subject: New parameter: Option to add WhoIs link on IP addresses.
X-Git-Tag: AWSTATS_4_0_BETA~22
X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d475327ce20ced16e06ed3c30d238c8ca0559557;p=thirdparty%2FAWStats.git
New parameter: Option to add WhoIs link on IP addresses.
---
diff --git a/docs/awstats_changelog.txt b/docs/awstats_changelog.txt
index 6e678aaf..3e9d8d95 100644
--- a/docs/awstats_changelog.txt
+++ b/docs/awstats_changelog.txt
@@ -16,17 +16,22 @@ AWStats Changelog
- New feature: Added average files size in Pages/URL report chart.
- New feature: You can put dynamic environnement variables into config file.
- New feature: Keyphrases list can be viewed entirely (not only most used).
-- New parameter: ValidHTTPCodes
-- New parameter: StyleSheet
- New parameter: WrapperScript
- New parameter: CreateDirDataIfNotExists
+- New parameter: ValidHTTPCodes
+- New parameter: MaxRowsInHTMLOutput
+- New parameter: ShowLinksToWhoIs
+- New parameter: LinksToWhoIs
+- New parameter: StyleSheet
- New tool: A log format converter common2combined.pl
- New option: -staticlinks to build static links in report page (to use
AWStats with no web servers).
- Fixed: wrong size of bar in "average" report when average value was < 1.
- Fixed: pb of "Error: Not same number of records" when using some version
of mod_perl.
+- Fixed: pb in logresolvemerge.pl
- No more need to use \. to say . in config file.
+- Documentation seriously updated.
3.2
@@ -54,9 +59,9 @@ AWStats Changelog
http://mysite/sameurl?param=x of http://mysite/sameurl?param=y
- New feature: ShowFlagLinks can now accept list of all wanted flags for
translation link.
-- New feature: Add logresolvemerge tool to merge split log files
- from a load balancing web server before running awstats.
- New feature: Support standard ISA server log format.
+- New tool: Add logresolvemerge tool to merge split log files
+ from a load balancing web server before running awstats.
- New parameter: HTMLHeadSection allows you to add HTML code in header report.
- New parameter: NbOfLinesForCorruptedLog.
- Fixed: no more warning/error messages when runned with option perl -w.
@@ -159,7 +164,7 @@ AWStats Changelog
- Setup instructions are cleaner
-2.22
+2.1
- AWStats considers myserver and www.myserver as the same, even if "HostAliases" setup is wrong.
- Fixed a bug making unique visitors counter too high.
@@ -167,21 +172,15 @@ AWStats Changelog
- Make difference between unknown browsers and unknown OS.
- Robots stats are isolated from the rest of visitors.
- Better keywords detection algorithm.
-- Code a little bit cleaner and faster.
-- Images are in .png format.
-- Added Spanish language (now 4 different languages supported).
-- 252 domains/countries, 40 browsers database, 22 OS, 250 robots, 32 search engines.
-
-
-2.1
-
- Added last time connection for each hosts
- Added list of URL for HTTP Error 404
- Added pages, hits and KB for each statistics
- Added colors and links
- Works also with IIS
-- 3 languages: English, French and Dutch
-- 250 domains/countries, 38 browsers (more with all versions), 19 OS, 186 robots, 24 search engines.
+- Code a little bit cleaner and faster.
+- Images are in .png format.
+- 4 languages: English, French, Dutch, Spanish
+- 252 domains/countries, 40 browsers database, 22 OS, 250 robots, 32 search engines.
1.0
diff --git a/docs/awstats_config.html b/docs/awstats_config.html
index da32d54a..69e39c5b 100644
--- a/docs/awstats_config.html
+++ b/docs/awstats_config.html
@@ -89,6 +89,7 @@ it with its value when reading it), follow the example:
OPTIONAL APPEARANCE SETUP SECTION (Not required but increase AWStats features)
+- MaxRowsInHTMLOutput
- Lang
- DirLang
- ShowHeader
@@ -128,6 +129,8 @@ it with its value when reading it), follow the example:
- ShowFlagLinks
- ShowLinksOnUrl
- MaxLengthOfURL
+
- ShowLinksToWhoIs
+
- LinksToWhoIs
- HTMLHeadSection
- HTMLEndSection
- BarWidth
@@ -159,6 +162,7 @@ it with its value when reading it), follow the example:
LogFile
+Version : 1.0 +
# "LogFile" contains the web server logfile to analyze.
# You can use a full path or relative path from awstats.pl directory.
# Example: "/var/log/apache/access.log"
@@ -182,6 +186,7 @@ it with its value when reading it), follow the example:
LogFormat
+Version : 2.1 +
# Put here your log format (Must agree with your web server. See setup
# instructions in README.txt to know how to configure your web server to have
# the required log format).
@@ -227,6 +232,7 @@ it with its value when reading it), follow the example:
DNSLookup
+Version : 1.0 +
# If you want to have informations on domains/countries visitors, you must ask
# AWStats to make reverse DNS lookup (if not already done in your log file).
# If you set DNSLookup to 1, don't forget that reverse DNS lookup decrease
@@ -242,6 +248,7 @@ it with its value when reading it), follow the example:
DirData
+Version : 1.0 +
# When AWStats updates its statistics, it stores results of its analysis in
# files (AWStats database). All those files are written in the directory
# defined by the "DirData" parameter. Set this value to the directory where
@@ -259,6 +266,7 @@ it with its value when reading it), follow the example:
DirCgi
+Version : 1.0 +
# Relative or absolute web URL of your awstats.pl directory.
# This parameter is used only when AWStats is runned from command line
# with -output option (to generate links in HTML reported page).
@@ -269,6 +277,7 @@ it with its value when reading it), follow the example:
DirIcons
+Version : 1.0 +
# Relative or absolute web URL of all icons subdirectories.
# Default: "/icon" (means you must copy icon directories in "/mywwwroot/icon")
#
@@ -277,6 +286,7 @@ it with its value when reading it), follow the example:
SiteDomain
+Version : 3.2 +
# "SiteDomain" must contain the main domain name or the main intranet web
# server name used to reach the web site.
# This parameter is only used to generate full URLs links when ShowLinksOnUrl
@@ -291,6 +301,7 @@ it with its value when reading it), follow the example:
Hostaliases
+Version : 1.0 +
# Put here all other possible domain names, addresses or virtual host aliases
# someone can use to access your site. Try to keep only the minimum number of
# possible names/adresses to have the best performances.
@@ -306,6 +317,7 @@ it with its value when reading it), follow the example:
AllowToUpdateStatsFromBrowser
+Version : 3.0 +
# When this parameter is set to 1, AWStats add a button on report page to
# allow to "update" statistics from a web browser. Warning, when "update" is
# made from a browser, AWStats is runned as a CGI by the web server user
@@ -353,6 +365,7 @@ it with its value when reading it), follow the example:
PurgeLogFile
+Version : 2.23 +
# AWStats can purge log after processing it. By this way, the next time you
# launch AWStats, log file will be smaller and processing time will be better.
# IMPORTANT !!!
@@ -371,6 +384,7 @@ it with its value when reading it), follow the example:
ArchiveLogRecords
+Version : 2.1 +
# When PurgeLogFile is setup to 1, AWStats will clean your log file after
# processing it. You can however keep an archive file (saved in "DirData") of
# all processed log records by setting this to 1 (For example if you want to
@@ -400,6 +414,7 @@ it with its value when reading it), follow the example:
DefaultFile
+Version : 1.0 +
# Index page name for your web server.
# Example: "default.htm"
# Default: "index.html"
@@ -409,6 +424,7 @@ it with its value when reading it), follow the example:
SkipHosts
+Version : 1.0 +
# Do not include access from clients that match following criteria.
# If your log file contains IP adresses in host field, you must put here
# matching IP adresses criteria.
@@ -424,6 +440,7 @@ it with its value when reading it), follow the example:
SkipDNSLookupFor
+Version : 3.0 +
# You can specify specific IP addresses that should NOT be looked up in
# the DNS. You may specify partial addresses (ie 163.85. for everything
# behind the usual firewall setup, etc)...
@@ -437,6 +454,7 @@ it with its value when reading it), follow the example:
SkipFiles
+Version : 1.0 +
# Use SkipFiles to ignore access to URLs that match one of following entries.
# You can, with this option, add a list of not important frame pages (like
# menus, etc...) to exclude them from statistics.
@@ -454,6 +472,7 @@ it with its value when reading it), follow the example:
OnlyFiles
+Version : 3.0 +
# Include in stats, only accesses to URLs that match one of following entries.
# For example, if you want AWStats to filter access to keep only stats that
# match a particular string, like a particular directory, you can add this
@@ -470,6 +489,7 @@ it with its value when reading it), follow the example:
NotPageList
+Version : 3.2 +
# Add here a list of kind of url (file extension) that must be counted as
# "Hit only" and not as a "Hit" and "Page viewed". You can set here all images
# extensions as they are hit downloaded that must be counted but they are not
@@ -569,6 +589,7 @@ it with its value when reading it), follow the example:
NbOfLinesForCorruptedLog
+Version : 3.2 +
# To help you to detect if your log format is good, AWStats report an error
# if the first NbOfLinesForCorruptedLog lines have all a format that does not
# match the LogFormat parameter.
@@ -582,6 +603,7 @@ it with its value when reading it), follow the example:
SplitSearchString
+Version : 2.24 +
# Search engines keywords reported are full search string or separate keywords
# Possible values:
# 0 - Search keywords reported are full search string (ie: "town maps")
@@ -629,7 +651,18 @@ it with its value when reading it), follow the example:
+MaxRowsInHTMLOutput
+Version : 4.0 +
+
# To avoid too large web pages, you can ask AWStats to limit number of rows of
+
# all reported charts to this number when no other limit apply.
+
# Default: 1000
+
#
+
MaxRowsInHTMLOutput=1000
+
+
+
Lang
+Version : 2.1 +
# Set your primary language.
# Possible value:
# Bosnian=ba, Chinese (Taiwan)=tw, Chinese (Traditional)=cn, Czech=cz,
@@ -645,6 +678,7 @@ it with its value when reading it), follow the example:
DirLang
+Version : 2.1 +
# Set the location of language files.
# Example: "/opt/awstats/lang"
# Default: "./lang" (means lang directory is in same location than awstats.pl)
@@ -654,6 +688,7 @@ it with its value when reading it), follow the example:
Show...
+Version : 3.2 +
# You choose here which summary report you want to see in the main page.
# Whatever is your setup here, all detailed reports are still available.
# So if you setup to 1 only ShowHeader, ShowMenu and ShowMonthDayStats, all
@@ -683,6 +718,7 @@ it with its value when reading it), follow the example:
Max...
+Version : 1.0 +
# This value can be used to choose maximum number of lines shown for each
# particular reporting.
#
@@ -710,6 +746,7 @@ it with its value when reading it), follow the example:
FirstDayOfWeek
+Version : 3.2 +
# Choose if you want week to start on sunday or monday
# Possible values:
# 0 - Week start on sunday
@@ -721,6 +758,7 @@ it with its value when reading it), follow the example:
DetailedReportsOnNewWindows
+Version : 3.2 +
# This parameter ask your browser to open detailed reports into a different
# window than the main page.
# Possible values: 1 or 0
@@ -731,6 +769,7 @@ it with its value when reading it), follow the example:
ShowFlagLinks
+Version : 3.2 +
# List of visible flags with link to other language translations.
# If you don't want any flag link, set ShowFlagLinks to "".
# This parameter is used only if ShowHeader is set to 1.
@@ -742,6 +781,7 @@ it with its value when reading it), follow the example:
ShowLinksOnUrl
+Version : 3.1 +
# Each URL shown in stats report views are links you can click.
# Possible values: 1 or 0
# Default: 1
@@ -751,6 +791,7 @@ it with its value when reading it), follow the example:
MaxLengthOfURL
+Version : 1.0 +
# Maximum length of URL shown on stats page (number of characters). This
# affects only URL visible text, link still work.
# Default: 72
@@ -759,7 +800,34 @@ it with its value when reading it), follow the example:
+ShowLinksToWhoIs
+Version : 4.0 +
+
# AWStats can include a link to WhoIs database on all hostnames. For this, you
+
# must set ShowLinksToWhoIs to 1. Warning, a such feature depends on next
+
# parameter (LinksForWhoIs) and on WhoIs server exhaustivity and availability.
+
# For this reason, this feature can't be a reliable feature.
+
# Possible values: 1 or 0
+
# Default: 0
+
#
+
ShowLinksToWhoIs=0
+
+
+
+LinksToWhoIs
+Version : 4.0 +
+
# Set here the link used to point to Internet WhoIs database.
+
# This parameter is not used if ShowLinksToWhoIs is 0.
+
# Default: "http://www.whois.net/search.cgi2?str="
+
# Example: "http://www.netsol.com/cgi-bin/whois/whois?SearchType=all&STRING="
+
# Example: "http://www.ripe.net/perl/whois?form_type=simple&searchtext="
+
# Example: "http://www.arin.net/cgi-bin/whois.pl?queryinput="
+
#
+
LinksToWhoIs="http://www.whois.net/search.cgi2?str="
+
+
+
HTMLHeadSection
+Version : 3.2 +
# You can put here HTML code that will be added at the top of AWStats reports.
# Default: ""
#
@@ -768,6 +836,7 @@ it with its value when reading it), follow the example:
HTMLEndSection
+Version : 3.2 +
# You can put here HTML code that will be added at the end of AWStats reports.
# Great to add advert ban.
# Default: ""
@@ -777,6 +846,7 @@ it with its value when reading it), follow the example:
Bar...
+Version : 1.0 +
# Value of maximum bar width/heigth for horizontal/vertical graphics bar
# Default: 260/180
#
@@ -786,7 +856,7 @@ it with its value when reading it), follow the example:
Logo...
-Version : 3.1
+Version : 3.1 +
# You can set Logo and LogoLink to use your own logo.
# Logo must be the name of image file (must be in $DirIcons/other directory).
# LogoLink is the expected URL when clicking on Logo.
@@ -798,7 +868,7 @@ it with its value when reading it), follow the example:
StyleSheet
-Version : 4.0+
+Version : 4.0 +
# You can ask AWStats to use a particular CSS (Cascading Style Sheet) to
# change its look.
# Example: "/css/awstats.css"
diff --git a/wwwroot/cgi-bin/awstats.model.conf b/wwwroot/cgi-bin/awstats.model.conf
index 3814389e..22979e39 100644
--- a/wwwroot/cgi-bin/awstats.model.conf
+++ b/wwwroot/cgi-bin/awstats.model.conf
@@ -369,6 +369,12 @@ LevelForRefererAnalyze=1 # 0 will increase AWStats speed by 6%.
# OPTIONAL APPEARANCE SETUP SECTION (Not required but increase AWStats features)
#-----------------------------------------------------------------------------
+# To avoid too large web pages, you can ask AWStats to limit number of rows of
+# all reported charts to this number when no other limit apply.
+# Default: 1000
+#
+MaxRowsInHTMLOutput=1000
+
# Set your primary language.
# Possible value:
# Bosnian=ba, Chinese (Taiwan)=tw, Chinese (Traditional)=cn, Czech=cz,
@@ -472,6 +478,24 @@ ShowLinksOnUrl=1
#
MaxLengthOfURL=72
+# AWStats can include a link to WhoIs database on all hostnames. For this, you
+# must set ShowLinksToWhoIs to 1. Warning, a such feature depends on next
+# parameter (LinksForWhoIs) and on WhoIs server exhaustivity and availability.
+# For this reason, this feature can't be a reliable feature.
+# Possible values: 1 or 0
+# Default: 0
+#
+ShowLinksToWhoIs=0
+
+# Set here the link used to point to Internet WhoIs database.
+# This parameter is not used if ShowLinksToWhoIs is 0.
+# Default: "http://www.whois.net/search.cgi2?str="
+# Example: "http://www.netsol.com/cgi-bin/whois/whois?SearchType=all&STRING="
+# Example: "http://www.ripe.net/perl/whois?form_type=simple&searchtext="
+# Example: "http://www.arin.net/cgi-bin/whois.pl?queryinput="
+#
+LinksToWhoIs="http://www.whois.net/search.cgi2?str="
+
# You can put here HTML code that will be added at the top of AWStats reports.
# Default: ""
#
diff --git a/wwwroot/cgi-bin/awstats.pl b/wwwroot/cgi-bin/awstats.pl
index 7d521467..e733ddae 100644
--- a/wwwroot/cgi-bin/awstats.pl
+++ b/wwwroot/cgi-bin/awstats.pl
@@ -21,7 +21,7 @@ use vars qw(%DomainsHashIDLib @RobotsSearchIDOrder_list1 @RobotsSearchIDOrder_li
#-------------------------------------------------------
# Defines
#-------------------------------------------------------
-my $VERSION="4.0 (build 57)";
+my $VERSION="4.0 (build 58)";
# ---------- Init variables -------
my $Debug=0;
@@ -71,9 +71,10 @@ $MinHitLogin, $MinHitRefer, $MinHitRobot,
$NbOfLinesRead, $NbOfLinesDropped, $NbOfLinesCorrupted, $NbOfOldLines, $NbOfNewLines,
$NowNewLinePhase, $NbOfLinesForCorruptedLog, $PurgeLogFile,
$ShowAuthenticatedUsers, $ShowCompressionStats, $ShowFileSizesStats,
-$ShowDropped, $ShowCorrupted, $ShowUnknownOrigin, $SplitSearchString, $StartSeconds, $StartMicroseconds,
+$ShowDropped, $ShowCorrupted, $ShowUnknownOrigin, $ShowLinksToWhoIs,
+$SplitSearchString, $StartSeconds, $StartMicroseconds,
$StaticLinks, $UpdateStats, $URLWithQuery)=
-(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
my ($AllowToUpdateStatsFromBrowser, $ArchiveLogRecords, $DetailedReportsOnNewWindows,
$FirstDayOfWeek, $SaveDatabaseFilesWithPermissionsForEveryone,
$LevelForRobotsDetection, $LevelForBrowsersDetection, $LevelForOSDetection,
@@ -83,11 +84,13 @@ $ShowHoursStats, $ShowDomainsStats, $ShowHostsStats,
$ShowRobotsStats, $ShowPagesStats, $ShowFileTypesStats,
$ShowBrowsersStats, $ShowOSStats, $ShowOriginStats, $ShowKeyphrasesStats,
$ShowKeywordsStats, $ShowHTTPErrorsStats,
-$ShowFlagLinks, $ShowLinksOnUrl, $WarningMessages)=
+$ShowFlagLinks, $ShowLinksOnUrl,
+$WarningMessages)=
(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1);
my ($ArchiveFileName, $DayRequired, $DefaultFile, $FileConfig, $FileSuffix,
$HTMLHeadSection, $HTMLEndSection, $HTMLOutput, $Host,
-$LastUpdate, $LogFile, $LogFormat, $LogFormatString, $Logo, $LogoLink,
+$LastUpdate, $LinksToWhoIs,
+$LogFile, $LogFormat, $LogFormatString, $Logo, $LogoLink,
$MonthRequired, $PageCode, $PerlParsingFormat, $QueryString,
$SiteConfig, $SiteDomain, $SiteToAnalyze, $SiteToAnalyzeWithoutwww,
$StyleSheet, $WrapperScript,
@@ -584,11 +587,6 @@ sub Read_Config_File {
if ($param =~ /^ShowKeywordsStats/) { $ShowKeywordsStats=$value; next; }
if ($param =~ /^ShowCompressionStats/) { $ShowCompressionStats=$value; next; }
if ($param =~ /^ShowHTTPErrorsStats/) { $ShowHTTPErrorsStats=$value; next; }
- if ($param =~ /^FirstDayOfWeek/) { $FirstDayOfWeek=$value; next; }
- if ($param =~ /^DetailedReportsOnNewWindows/) { $DetailedReportsOnNewWindows=$value; next; }
- if ($param =~ /^ShowFlagLinks/) { $ShowFlagLinks=$value; next; }
- if ($param =~ /^ShowLinksOnUrl/) { $ShowLinksOnUrl=$value; next; }
- if ($param =~ /^MaxLengthOfURL/) { $MaxLengthOfURL=$value; next; }
if ($param =~ /^MaxRowsInHTMLOutput/) { $MaxRowsInHTMLOutput=$value; next; } # Not used yet
if ($param =~ /^MaxNbOfDomain/) { $MaxNbOfDomain=$value; next; }
if ($param =~ /^MaxNbOfHostsShown/) { $MaxNbOfHostsShown=$value; next; }
@@ -603,6 +601,13 @@ sub Read_Config_File {
if ($param =~ /^MinHitRefer/) { $MinHitRefer=$value; next; }
if ($param =~ /^MaxNbOfKeywordsShown/) { $MaxNbOfKeywordsShown=$value; next; }
if ($param =~ /^MinHitKeyword/) { $MinHitKeyword=$value; next; }
+ if ($param =~ /^FirstDayOfWeek/) { $FirstDayOfWeek=$value; next; }
+ if ($param =~ /^DetailedReportsOnNewWindows/) { $DetailedReportsOnNewWindows=$value; next; }
+ if ($param =~ /^ShowFlagLinks/) { $ShowFlagLinks=$value; next; }
+ if ($param =~ /^ShowLinksOnUrl/) { $ShowLinksOnUrl=$value; next; }
+ if ($param =~ /^MaxLengthOfURL/) { $MaxLengthOfURL=$value; next; }
+ if ($param =~ /^ShowLinksToWhoIs/) { $ShowLinksToWhoIs=$value; next; }
+ if ($param =~ /^LinksToWhoIs/) { $LinksToWhoIs=$value; next; }
if ($param =~ /^HTMLHeadSection/) { $HTMLHeadSection=$value; next; }
if ($param =~ /^HTMLEndSection/) { $HTMLEndSection=$value; next; }
if ($param =~ /^BarWidth/) { $BarWidth=$value; next; }
@@ -828,6 +833,7 @@ sub Check_Config {
if ($LevelForRefererAnalyze !~ /^[\d]+/) { $LevelForRefererAnalyze=1; }
if ($LevelForKeywordsDetection !~ /^[\d]+/) { $LevelForKeywordsDetection=1; }
# Optional appearance setup section
+ if ($MaxRowsInHTMLOutput !~ /^[\d]+/ || $MaxRowsInHTMLOutput<1) { $MaxRowsInHTMLOutput=1000; }
if ($ShowHeader !~ /[0-1]/) { $ShowHeader=1; }
if ($ShowMenu !~ /[0-1]/) { $ShowMenu=1; }
if ($ShowMonthDayStats !~ /[0-1]/) { $ShowMonthDayStats=1; }
@@ -847,7 +853,6 @@ sub Check_Config {
if ($ShowKeywordsStats !~ /[0-1]/) { $ShowKeywordsStats=1; }
if ($ShowCompressionStats !~ /[0-1]/) { $ShowCompressionStats=1; }
if ($ShowHTTPErrorsStats !~ /[0-1]/) { $ShowHTTPErrorsStats=1; }
- if ($ShowLinksOnUrl !~ /[0-1]/) { $ShowLinksOnUrl=1; }
if ($MaxNbOfDomain !~ /^[\d]+/ || $MaxNbOfDomain<1) { $MaxNbOfDomain=25; }
if ($MaxNbOfHostsShown !~ /^[\d]+/ || $MaxNbOfHostsShown<1) { $MaxNbOfHostsShown=25; }
if ($MinHitHost !~ /^[\d]+/ || $MinHitHost<1) { $MinHitHost=1; }
@@ -861,14 +866,15 @@ sub Check_Config {
if ($MinHitRefer !~ /^[\d]+/ || $MinHitRefer<1) { $MinHitRefer=1; }
if ($MaxNbOfKeywordsShown !~ /^[\d]+/ || $MaxNbOfKeywordsShown<1) { $MaxNbOfKeywordsShown=25; }
if ($MinHitKeyword !~ /^[\d]+/ || $MinHitKeyword<1) { $MinHitKeyword=1; }
- if ($MaxRowsInHTMLOutput !~ /^[\d]+/ || $MaxRowsInHTMLOutput<1) { $MaxRowsInHTMLOutput=1000; }
- if ($MaxLengthOfURL !~ /^[\d+]/ || $MaxLengthOfURL<1) { $MaxLengthOfURL=72; }
if ($FirstDayOfWeek !~ /[0-1]/) { $FirstDayOfWeek=1; }
if ($DetailedReportsOnNewWindows !~ /[0-1]/) { $DetailedReportsOnNewWindows=1; }
- if ($BarWidth !~ /^[\d]+/ || $BarWidth<1) { $BarWidth=260; }
- if ($BarHeight !~ /^[\d]+/ || $BarHeight<1) { $BarHeight=180; }
+ if ($ShowLinksOnUrl !~ /[0-1]/) { $ShowLinksOnUrl=1; }
+ if ($MaxLengthOfURL !~ /^[\d+]/ || $MaxLengthOfURL<1) { $MaxLengthOfURL=72; }
+ if ($ShowLinksToWhoIs !~ /[0-1]/) { $ShowLinksToWhoIs=0; }
if (! $Logo) { $Logo="awstats_logo1.png"; }
if (! $LogoLink) { $LogoLink="http://awstats.sourceforge.net"; }
+ if ($BarWidth !~ /^[\d]+/ || $BarWidth<1) { $BarWidth=260; }
+ if ($BarHeight !~ /^[\d]+/ || $BarHeight<1) { $BarHeight=180; }
$color_Background =~ s/#//g; if ($color_Background !~ /^[0-9|A-Z]+$/i) { $color_Background="FFFFFF"; }
$color_TableBGTitle =~ s/#//g; if ($color_TableBGTitle !~ /^[0-9|A-Z]+$/i) { $color_TableBGTitle="CCCCDD"; }
$color_TableTitle =~ s/#//g; if ($color_TableTitle !~ /^[0-9|A-Z]+$/i) { $color_TableTitle="000000"; }
@@ -1002,6 +1008,7 @@ sub Check_Config {
if (! $Message[111]) { $Message[111]="Grabber"; }
if (! $Message[112]) { $Message[112]="Yes"; }
if (! $Message[113]) { $Message[113]="No"; }
+ if (! $Message[114]) { $Message[114]="WhoIs info"; }
# Check if DirData is OK
if (! -d $DirData) {
if ($CreateDirDataIfNotExists) {
@@ -2005,6 +2012,23 @@ sub Format_Date {
return "$dateformat";
}
+#--------------------------------------------------------------------
+# Function: Write a HTML cell with a WhoIs link to parameter
+# Parameter: Key to used as WhoIs target
+# Input: $LinksToWhoIs
+#--------------------------------------------------------------------
+sub ShowWhoIsCell {
+ my $keyurl=shift;
+ my $keyforwhois;
+ if ($keyurl =~ /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/) {
+ # $keyforwhois=$key;
+ }
+ else { $keyurl =~ /(\w+\.\w+)$/; $keyforwhois=$1; }
+ print "";
+ if ($keyforwhois) { print "?"; }
+ print " | ";
+}
+
#--------------------------------------------------------------------
# Function: Return 1 if string contains only ascii chars
# Input: String
@@ -3551,6 +3575,7 @@ EOF
print "";
if ($ShowDomainsStats) { print "$Message[17] "; }
if ($ShowHostsStats) { print "".ucfirst($Message[81])." "; }
+ if ($ShowHostsStats) { print "$Message[80] \n"; }
if ($ShowHostsStats) { print "$Message[9] \n"; }
if ($ShowHostsStats) { print "$Message[45] \n"; }
if ($ShowAuthenticatedUsers) { print "$Message[94] "; }
@@ -3590,14 +3615,17 @@ EOF
if ($QueryString =~ /output=allhosts/i) {
print "$CENTER ";
&tab_head($Message[81],19);
- if ($MonthRequired ne "year") { print " | | $Message[81] : $TotalHostsKnown $Message[82], $TotalHostsUnknown $Message[1] - $TotalUnique $Message[11] | $Message[56] | $Message[57] | $Message[75] | $Message[9] |
\n"; }
- else { print "| $Message[81] : ".(scalar keys %_hostmachine_h)." | $Message[56] | $Message[57] | $Message[75] | $Message[9] |
\n"; }
+ if ($MonthRequired ne "year") { print "| $Message[81] : $TotalHostsKnown $Message[82], $TotalHostsUnknown $Message[1] - $TotalUnique $Message[11] | "; }
+ else { print "
|---|
| $Message[81] : ".(scalar keys %_hostmachine_h)." | "; }
+ if ($ShowLinksToWhoIs && $LinksToWhoIs) { print "$Message[114] | "; }
+ print "$Message[56] | $Message[57] | $Message[75] | $Message[9] |
\n";
$total_p=$total_h=$total_k=0;
my $count=0;
&BuildKeyList($MaxRowsInHTMLOutput,$MinHitHost,\%_hostmachine_h,\%_hostmachine_p);
foreach my $key (@keylist) {
my $host=CleanFromCSSA($key);
print "| ".($_robot_l{$key}?"":"")."$host".($_robot_l{$key}?"":"")." | ";
+ if ($ShowLinksToWhoIs && $LinksToWhoIs) { ShowWhoIsCell($key); }
print "".($_hostmachine_p{$key}?$_hostmachine_p{$key}:" ")." | $_hostmachine_h{$key} | ".Format_Bytes($_hostmachine_k{$key})." | ";
if ($_hostmachine_l{$key}) { print "".Format_Date($_hostmachine_l{$key},1)." | "; }
else { print "- | "; }
@@ -3612,7 +3640,9 @@ EOF
$rest_h=$TotalHits-$total_h;
$rest_k=$TotalBytes-$total_k;
if ($rest_p > 0 || $rest_h > 0 || $rest_k > 0) { # All other visitors (known or not)
- print "
| $Message[2] | $rest_p | $rest_h | ".Format_Bytes($rest_k)." | |
\n";
+ print "| $Message[2] | ";
+ if ($ShowLinksToWhoIs && $LinksToWhoIs) { ShowWhoIsCell(""); }
+ print "$rest_p | $rest_h | ".Format_Bytes($rest_k)." | |
\n";
}
&tab_end;
&html_end;
@@ -3621,14 +3651,17 @@ EOF
if ($QueryString =~ /output=lasthosts/i) {
print "$CENTER
";
&tab_head($Message[9],19);
- if ($MonthRequired ne "year") { print "| $Message[81] : $TotalHostsKnown $Message[82], $TotalHostsUnknown $Message[1] - $TotalUnique $Message[11] | $Message[56] | $Message[57] | $Message[75] | $Message[9] |
\n"; }
- else { print "| $Message[81] : ".(scalar keys %_hostmachine_h)." | $Message[56] | $Message[57] | $Message[75] | $Message[9] |
\n"; }
+ if ($MonthRequired ne "year") { print "| $Message[81] : $TotalHostsKnown $Message[82], $TotalHostsUnknown $Message[1] - $TotalUnique $Message[11] | "; }
+ else { print "
|---|
| $Message[81] : ".(scalar keys %_hostmachine_h)." | "; }
+ if ($ShowLinksToWhoIs && $LinksToWhoIs) { print "$Message[114] | "; }
+ print "$Message[56] | $Message[57] | $Message[75] | $Message[9] |
\n";
$total_p=$total_h=$total_k=0;
my $count=0;
&BuildKeyList($MaxRowsInHTMLOutput,$MinHitHost,\%_hostmachine_h,\%_hostmachine_l);
foreach my $key (@keylist) {
my $host=CleanFromCSSA($key);
print "| ".($_robot_l{$key}?"":"")."$host".($_robot_l{$key}?"":"")." | ";
+ if ($ShowLinksToWhoIs && $LinksToWhoIs) { ShowWhoIsCell($key); }
print "".($_hostmachine_p{$key}?$_hostmachine_p{$key}:" ")." | $_hostmachine_h{$key} | ".Format_Bytes($_hostmachine_k{$key})." | ";
if ($_hostmachine_l{$key}) { print "".Format_Date($_hostmachine_l{$key},1)." | "; }
else { print "- | "; }
@@ -3643,7 +3676,9 @@ EOF
$rest_h=$TotalHits-$total_h;
$rest_k=$TotalBytes-$total_k;
if ($rest_p > 0 || $rest_h > 0 || $rest_k > 0) { # All other visitors (known or not)
- print "
| $Message[2] | $rest_p | $rest_h | ".Format_Bytes($rest_k)." | |
\n";
+ print "| $Message[2] | ";
+ if ($ShowLinksToWhoIs && $LinksToWhoIs) { ShowWhoIsCell(""); }
+ print "$rest_p | $rest_h | ".Format_Bytes($rest_k)." | |
\n";
}
&tab_end;
&html_end;
@@ -3652,13 +3687,16 @@ EOF
if ($QueryString =~ /output=unknownip/i) {
print "$CENTER
";
&tab_head($Message[45],19);
- print "| ".(scalar keys %_hostmachine_h)." $Message[1] | $Message[56] | $Message[57] | $Message[75] | $Message[9] | \n";
+ print "
|---|
| ".(scalar keys %_hostmachine_h)." $Message[1] | ";
+ if ($ShowLinksToWhoIs && $LinksToWhoIs) { print "$Message[114] | "; }
+ print "$Message[56] | $Message[57] | $Message[75] | $Message[9] |
\n";
$total_p=$total_h=$total_k=0;
my $count=0;
&BuildKeyList($MaxRowsInHTMLOutput,$MinHitHost,\%_hostmachine_h,\%_hostmachine_p);
foreach my $key (@keylist) {
my $host=CleanFromCSSA($key);
print "| $host | ";
+ if ($ShowLinksToWhoIs && $LinksToWhoIs) { ShowWhoIsCell($key); }
print "".($_hostmachine_p{$key}||" ")." | $_hostmachine_h{$key} | ".Format_Bytes($_hostmachine_k{$key})." | ";
if ($_hostmachine_l{$key}) { print "".Format_Date($_hostmachine_l{$key},1)." | "; }
else { print "- | "; }
@@ -3673,7 +3711,9 @@ EOF
$rest_h=$TotalHits-$total_h;
$rest_k=$TotalBytes-$total_k;
if ($rest_p > 0 || $rest_h > 0 || $rest_k > 0) { # All other visitors (known or not)
- print "
| $Message[82] | $rest_p | $rest_h | ".Format_Bytes($rest_k)." | |
\n";
+ print "| $Message[82] | ";
+ if ($ShowLinksToWhoIs && $LinksToWhoIs) { ShowWhoIsCell(""); }
+ print "$rest_p | $rest_h | ".Format_Bytes($rest_k)." | |
\n";
}
&tab_end;
&html_end;
@@ -4201,13 +4241,18 @@ EOF
print "$CENTER
";
$MaxNbOfHostsShown = (scalar keys %_hostmachine_h) if $MaxNbOfHostsShown > (scalar keys %_hostmachine_h);
&tab_head("$Message[81] ($Message[77] $MaxNbOfHostsShown) - $Message[80] - $Message[9] - $Message[45]",19);
- if ($MonthRequired ne "year") { print "| $Message[81] : $TotalHostsKnown $Message[82], $TotalHostsUnknown $Message[1] - $TotalUnique $Message[11] | $Message[56] | $Message[57] | $Message[75] | $Message[9] |
\n"; }
- else { print "| $Message[81] : ".(scalar keys %_hostmachine_h)." | $Message[56] | $Message[57] | $Message[75] | $Message[9] |
\n"; }
+ if ($MonthRequired ne "year") { print "| $Message[81] : $TotalHostsKnown $Message[82], $TotalHostsUnknown $Message[1] - $TotalUnique $Message[11] | "; }
+ else { print "
|---|
| $Message[81] : ".(scalar keys %_hostmachine_h)." | "; }
+ if ($ShowLinksToWhoIs && $LinksToWhoIs) { print "$Message[114] | "; }
+ print "$Message[56] | $Message[57] | $Message[75] | $Message[9] |
\n";
$total_p=$total_h=$total_k=0;
my $count=0;
&BuildKeyList($MaxNbOfHostsShown,$MinHitHost,\%_hostmachine_h,\%_hostmachine_p);
foreach my $key (@keylist) {
- print "| $key | ".($_hostmachine_p{$key}||" ")." | $_hostmachine_h{$key} | ".Format_Bytes($_hostmachine_k{$key})." | ";
+ print "
";
+ print "| $key | ";
+ if ($ShowLinksToWhoIs && $LinksToWhoIs) { ShowWhoIsCell($key); }
+ print "".($_hostmachine_p{$key}||" ")." | $_hostmachine_h{$key} | ".Format_Bytes($_hostmachine_k{$key})." | ";
if ($_hostmachine_l{$key}) { print "".Format_Date($_hostmachine_l{$key},1)." | "; }
else { print "- | "; }
print "
\n";