Do it via a .htaccess file


On Mon, 04 Jun 2001 13:56:14 -0400, [EMAIL PROTECTED] (Kurt
Edmiston) wrote:

>Hi, I want to limit access to one of my scripts.  I have a list of web 
>pages that are authorized to call my script, and I want to disable the 
>script if another unauthorized page calls it.  My code to do this looks 
>like the following:
>
>
>      my $referer  = $ENV{HTTP_REFERER};
>      my $legal_referer;
>      my(@legal_referers) = ("http://www.some-url.com/page1.html";);   # 
>list of authorized pages
>      my $clear = 0;
>
>      foreach $legal_referer (@legal_referers)
>      {
>         if ($legal_referer eq $referer)
>         {  $clear = 1;  }
>      }
>
>      if (!$clear)
>      {  # kill the script  }
>      ...
>
>
>I want to know if this is a good (safe) way to do this.  I'm open to any 
>suggestions.  Thanks in advance.
>
>Kurt


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to