Apache-ParseLog

 view release on metacpan or  search on metacpan

ParseLog.pm  view on Meta::CPAN

    $|++;
    use Apache::ParseLog;

    $conf = "/usr/local/httpd/conf/httpd.conf";
    $base = new Apache::ParseLog($conf);

    $log = $base->getCustomLog("common");
    %user = $log->user();

    print "Users Report\n";
    foreach (sort keys %user) {
        print "$_:\t$user{$_}\n" unless m/^-$/;
    }

    exit;

=head1 SEE ALSO

perl(1), perlop(1), perlre(1), Exporter(3)

=head1 BUGS

The reports on lesser-known browsers returned from the F<AgentLog> methods 
are not always informative. 

The data returned from the C<referer()> method for F<RefererLog> may 
be irrelvant if the referred files are not accessed via HTTP (i.e., 
the referer does not start with "http://" string). 

If the base object is created with the I<$virtualhost> specified, 
unless the F<ServerAdmin> and F<ServerName> are specified within
the <VirtualHost xxx> ... </VirtualHost>, those values specified
in the global section of the I<httpd.conf> are not shared with
the I<$virtualhost>. 

=head1 TO DO

Increase the performance (speed). 

=head1 VERSION

Apache::ParseLog 1.01 (10/01/1998).

=head1 AUTHOR

Apache::ParseLog was written and is maintained by Akira Hangai 
(akira@discover-net.net)

For the bug reports, comments, suggestions, etc., please email me. 

=head1 COPYRIGHT

Copyright 1998, Akira Hangai. All rights reserved. 

This program is free software; You can redistribute it and/or modify 
it under the same terms as Perl itself. 

=head1 DISCLAIMER

This package is distributed in the hope that it will be useful for
many web administrators/webmasters who are too busy to write their own
programs to analyze the Apache log files. However, this package is
so distributed WITHOUT ANY WARRANTY in that any use of the data
generated by this package must be used at the user's own discretion, 
and the author shall not be held accountable for any results
from the use of this package. 

=cut

#######################################################################
# DATA 
#######################################################################
__DATA__
ad:Andorra
ae:United Arab Emirates
af:Afghanistan
ag:Antigua and Barbuda
ai:Anguilla
al:Albania
am:Armenia
an:Netherlands Antilles
ao:Angola
aq:Antarctica
ar:Argentina
as:American Samoa
at:Austria
au:Australia
aw:Aruba
az:Azerbaijan
ba:Bosnia and Herzegovina
bb:Barbados
bd:Bangladesh
be:Belgium
bf:Burkina Faso
bg:Bulgaria
bh:Bahrain
bi:Burundi
bj:Benin
bm:Bermuda
bn:Brunei Darussalam
bo:Bolivia
br:Brazil
bs:Bahamas
bt:Bhutan
bv:Bouvet Island
bw:Botswana
by:Belarus
bz:Belize
ca:Canada
cc:Cocos (Keeling) Islands
cf:Central African Republic
cg:Congo
ch:Switzerland
ci:Cote D'Ivoire (Ivory Coast)
ck:Cook Islands
cl:Chile
cm:Cameroon
cn:China
co:Colombia
cr:Costa Rica
cs:Czechoslovakia (former)



( run in 2.005 seconds using v1.01-cache-2.11-cpan-98e64b0badf )