Closed Thread
Results 1 to 4 of 4

Thread: authorized domain check

  1. #1
    Senior Member megacool is an unknown quantity at this point
    Join Date
    Nov 2000
    Location
    Cyberspace
    Posts
    152

    PHP authorized domain check

    I used to have this PHP script which would.. check the referring domain (multiple) and if authorized would go on and parse the rest of the page, if not it would just stop there and won't go any further.

    can anyone help me find this?
    Last edited by megacool; May 5th, 2003 at 05:30.
    The truth is out there? Does anyone know the URL?

  2. #2
    Junior Member n1xn0x is an unknown quantity at this point
    Join Date
    Dec 2002
    Posts
    18
    I have it but written under Perl/CGI
    Contact me for more info

  3. #3
    FWS Addict Loon is an unknown quantity at this point
    Join Date
    Apr 2003
    Location
    London, U.K
    Posts
    691
    You could use .htaccess

    Code:
    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^http://yourdomain.com/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://allowed_domain.com/.*$ [NC]
    RewriteRule .*\.(php)$ - [F]
    Change the RewriteRule .*\.(php)$ - [F] to the extension of the pages/files you want to restrict, for multiple files you can use .*\.(php|html|zip|jpg)$ etc ...

    Domains not listed there as allowed will be directed to your 403 page

  4. #4
    Senior Member megacool is an unknown quantity at this point
    Join Date
    Nov 2000
    Location
    Cyberspace
    Posts
    152
    Thanks but

    see im trying embed it inside a PHP page I have.. I just don't want people coming to it unless they click on a link to my site.
    The truth is out there? Does anyone know the URL?

Closed Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts