RE: log missing images

[email protected] ("Hildreth, Steve")
Newsgroups perl.beginners
Message-ID <[email protected]>
Of course, here it is...very simple.

#!/usr/local/bin/perl

# This script is used to log the referring URL in the event that a link
on an LAUSD is invalid

#Append referring URL to log file
open(LIST,">>/www-logs/error_file.txt");

#Capture referring URL
$_ = $ENV{'HTTP_REFERER'};

#Determine if originating page belongs to LAUSD
if(!/notebook.lausd.net|.gif|.css|aw:|google.com|myspace.com|.gif|.jpg/)
{
     print LIST "$_\n";
}
close (LIST);

#Redirect user to standard error page
print "Content-type: text/html\n\n";
print "<meta HTTP-EQUIV=\"Refresh\"
CONTENT=\"0;URL=http://www.lausd.net/error.html\">";

Thanks,


Steve
-----------------------------------
Steve Hildreth
Office: 213-241-1691
Cell: 213-215-8195
[email protected]


-----Original Message-----
From: Gunnar Hjalmarsson [mailto:[email protected]] 
Sent: Monday, May 12, 2008 12:13 PM
To: [email protected]
Subject: Re: log missing images

Hildreth, Steve wrote:
> What I am looking for is a parameter that I can add to my PERL script 
> that will specify the file call that resulted in the log entry.

How about showing us the Perl (not PERL) script you have so far?

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.