in reply to AuthorizedDomain script?

No, it does nothing. It's invalid Perl due to the casing and without more code it's invalid due to the ErrorHTML sub being undefined. Be careful about copying and running stuff you don't understand. There are short snippets in any number of languages that can lock-up a computer or do real damage.

Replies are listed 'Best First'.
Re^2: AuthorizedDomain script?
by spazm (Monk) on Jul 08, 2009 at 21:05 UTC
    The snippet (especially the updated one a couple of comments up) gets the point across: "check the HTTP_REFERER* header and compare it with my domain (example.com)." You aren't really at example.com, so you'll need to change that as well.

    *Yes, REFERER is misspelled in the http spec, so that really is the name of the header, instead of referrer.

      Yeah, I know. My point was that it's possible you can do things like fork bomb or erase your entire disk with a handful of characters and they can be disguised by a clever hacker as innocuous code. When I see an example like the one you showed us which is obviously, completely wrong it puts me on guard: suspecting that the source of the code, the site, is potentially dangerous. Just advising caution.