$ ./bwreport.php -h
Usage: bwreport.php [-d YYYYMMDD] [-u URI] [-i HOST/IP] [-r REGEXP] [-v]
-d YYYYMMDD Date of the logs to parse. If no date provided, yesterday assumed.
-i IP/HOST Only report log lines with IP/HOST for host part of log line
-r REGEXP Only report log lines that match REGEXP. Should be a valid grep regexp
-u URI Only report log lines with URI match to URI
-v Verbose mode
http://www.phorum.org/downloads/bwreport.php.gz
2 comments
Tobias Struckmeier Says:
I only looked briefly to your script, but because its a shell script, you should use $argv[0] instead of $_SERVER to access the script name.
Cheers
Tobias Struckmeier Says:
Ah I forgot one tip.
Instead of the shebang
#!/usr/local/bin/php
this one is better
#!/usr/bin/env php
because it more independet from system environment :)
Comments are disabled for this post.