The important part is here:
@valid_ref = ('http://www.willettsbutchers.co.uk') ;
foreach $ref (@valid_ref) {
if ($ENV{'HTTP_REFERER'} =~ m/$ref/i) {$is_valid = 1 ; last ;}
}
if (! $is_valid) {
print "Content-type: text/html\n\nERROR - Invalid Referrer\n" ;
exit 0 ;
}
Either the page you're accessing the script from is not at http://www.willettsbutchers.co.uk, or the server is not giving you a HTTP_REFERER variable.
Incidently, whoever wrote that script has to be one of the most inefficient coders ever. I wrote prettier code before I started coming to Perlmonks, and that's saying a lot. |