Hotlinking Script for CGIProxy

Discussion in 'Programming' started by david.amherst, Apr 13, 2007.

  1. #1
    I have an anti-hotlinking script for PHProxy, but I need one for my new CGIProxy. I was able to find this on Google:

      if($ENV{'HTTP_REFERER'} =~ /^http:\/\/www.443proxy.com/)
        {
        }
        else
        {
            &redirect_to('http://www.443proxy.com/', '');
        } 
    Code (markup):
    I am completely unfamiliar with CGI/Perl, so I do not know how this would be modified to check for more than one referrer. For instance, I want it to allow browsable.info, www.browsable.info, proxy.org, www.proxy.org, goodwaiter.com, and www.goodwaiter.com. How would this be done?

    Thanks,
    David
     
    david.amherst, Apr 13, 2007 IP