in reply to Re^4: ERROR - Invalid Referrer
in thread ERROR - Invalid Referrer

This script appears to be generated by a commercial script genertor. Normally in such cases, I'd recommend that you contact whoever sold you the thing and get them to fix it. But in this case, the code is so *incredibly bad* I can't recommend that you contact them. My real advice is to find a better script (perhpas the formmail replacement at NMS), or pay someone to write one. If you insist on using this script, you could just take out these lines:
@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 ; }
Those are the ones that give you the error and although a novice might think they offered some protection, they really don't.

Replies are listed 'Best First'.
Re^6: ERROR - Invalid Referrer
by rbspro (Initiate) on May 23, 2005 at 13:29 UTC
    thank you jZed you are turely a great monk you where right it now works cheers