Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
@referers = ('www.gate.net/~earthdes', 'file:/guest.htm', 'http://www.jamilin.com/'); # Check Referring URL &check_url; sub check_url { if ($ENV{'HTTP_REFERER'}) { foreach $referer (@referers) { if ($ENV{'HTTP_REFERER'} =~ /$referer/i) { $check_referer = '1'; last; } } } else { $check_referer = '1'; } if ($check_referer != 1) { &error('bad_referer'); } }
Originally posted as a Categorized Question.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How do I read code from another file into my script?
by httptech (Chaplain) on May 10, 2000 at 16:09 UTC | |
by Anonymous Monk on May 11, 2000 at 07:37 UTC |