Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Current script:
@referers = 'http://www.mydomain.com','http://www.another.com'); # Check Referring URL &check_url; sub check_url { local($check_referer) = 0; 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 to use require function with @referer URLs
by btrott (Parson) on May 10, 2000 at 09:12 UTC | |
|
Re: how to use require function with @referer URLs
by httptech (Chaplain) on May 10, 2000 at 16:12 UTC |