bobafifi has asked for the wisdom of the Perl Monks concerning the following question:
# Just the domain name, no "www" MY $AuthorizedDomain = 'example.com'; MY $FormDomain = LC $ENV{HTTP_REFERER}; $FormDomain =~ S!^https?://(?:www\.)?(.*?)(?:/.*)$!$1!; UNLESS($FormDomain eq LC $AuthorizedDomain) { ErrorHTML('Unauthorized access.'); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: AuthorizedDomain script?
by markkawika (Monk) on Jul 08, 2009 at 17:32 UTC | |
by Your Mother (Archbishop) on Jul 08, 2009 at 17:40 UTC | |
|
Re: AuthorizedDomain script?
by Your Mother (Archbishop) on Jul 08, 2009 at 17:32 UTC | |
by spazm (Monk) on Jul 08, 2009 at 21:05 UTC | |
by Your Mother (Archbishop) on Jul 08, 2009 at 22:39 UTC | |
|
Re: AuthorizedDomain script?
by markkawika (Monk) on Jul 08, 2009 at 17:04 UTC | |
by bobafifi (Beadle) on Jul 08, 2009 at 17:19 UTC | |
|
Re: AuthorizedDomain script?
by scorpio17 (Canon) on Jul 09, 2009 at 13:32 UTC |