This script logs referers to any webpage you tell it to, and produces a report.
Change the variable $Basedir to a directory that is readable/writable by the web daemon (create it; chmod 777) in both scripts. It is important that this directory be used for nothing else except to hold the log files. Upload both of the scripts, chmod 775 them. Insert the SSI call found in logref.pl to each of the pages you want log. It'll automagically create a logfile for it, and include it in its reports.
"By downloading this script I agree to indemnify DataDragon Information Services from any damage that could be done by this script. In other words, it's my own tough cookies if this script wreaks havok on my web server."
Listing of Scripts|