katgirl has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/local/bin/perl $referer = $ENV{'HTTP_REFERER'}; $user = $ENV{'REMOTE_ADDR'}; $usercomp = $ENV{'REMOTE_HOST'}; $url = $ENV{'REDIRECT_URL'}; $gmt = gmtime(time); print "Content-type: text/html\n\n"; if($url =~ m/jpg|gif/ig){ print "<img src=\"http://www.queenfans.com/none.gif\">"; }else{ print "<h1>Whoops!</h1><h3>$url</h3>That page does not exist. Please p +ress your back button and try again."; } if($referer ne ''){ open(FILE2,">>public/404.txt"); print FILE2 "$url|$referer|$user|$usercomp|$gmt\n"; close(FILE2); }
Thank you in advance, you're all great,
Kat
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: 404 image errors
by cLive ;-) (Prior) on Jun 11, 2002 at 12:31 UTC | |
by gav^ (Curate) on Jun 11, 2002 at 12:45 UTC | |
by cjf (Parson) on Jun 11, 2002 at 12:58 UTC | |
by katgirl (Hermit) on Jun 11, 2002 at 12:37 UTC | |
by cLive ;-) (Prior) on Jun 11, 2002 at 12:48 UTC | |
by katgirl (Hermit) on Jun 11, 2002 at 12:59 UTC | |
by merlyn (Sage) on Jun 11, 2002 at 13:26 UTC | |
by katgirl (Hermit) on Jun 11, 2002 at 13:38 UTC | |
| |
|
Re: 404 image errors
by cjf (Parson) on Jun 11, 2002 at 12:45 UTC |