Validate Referrer





8
Date Submitted Mon. Oct. 10th, 2005 10:43 AM
Revision 1 of 2
Coder mattrmiller
Tags PHP | Referrer | Validate
Comments 6 comments
Validate Referre
<?php
        // Validates a referer
        function ValidateReferer($strDomain)
        {              
                // Make domains
                $strDomain = str_replace("www.", "", strDomain);
               
                // Check
                if (strstr($_SERVER["HTTP_REFERER"], $strDomain))
                {
                        return true;
                }
               
                return false;
        }
?>

Matthew R. Miller

www.bluecreststudios.com
=================
Matthew R. Miller

http://bluecreststudios.com
http://www.codeandcoffee.com

Comments

Comments How many votes you gonna
Mon. Sep. 11th, 2006 7:27 AM    Scripter ctiggerf
Comments You are correct.
Sun. Feb. 19th, 2006 2:27 PM    Coder mattrmiller
Comments Missing money
Thu. Feb. 16th, 2006 7:02 PM    Helper mercutio
Comments Ahh...
Thu. Feb. 16th, 2006 1:02 PM    Coder mattrmiller
Comments Bad snippet.
Thu. Feb. 16th, 2006 7:30 AM    Beginner nev3rm0re
  Comments Another possiblility
Tue. Dec. 19th, 2006 3:56 PM    Beginner crc5779

Voting