<html>
<head>
<title>Week #7 BASIC ~ Lestat</title>
<link rel="stylesheet" type="text/css" href="/css/scriptskewl.css">
</head>

<body>

<?

// Check to see if user comes from a bookmark

// If they come from bookmark, deny access
    
if($HTTP_REFERER == ""){
    print(
"<strong><h5><font color='red'>Sorry, you must come from the known domain(<a href = \"http://www.timslan.com/scriptskewl/index.html\">here</a>)</font></h5></strong>
              <strong>Browser Type:</strong> $HTTP_USER_AGENT<br><br>
              <strong>Connecting from IP address:</strong> $REMOTE_ADDR <html></body>"
);
    }else{

    
// Check to see if they have come from my domain
    
$mydomain "http://www.timslan.com/";
         if(
eregi("$mydomain"$HTTP_REFERER)) { 
    
             
// this visitor has come from my domain, so process the form
                
print("<h5>Welcome to the entrance point!</h5>
                <strong>Youre browser type is:</strong> $HTTP_USER_AGENT<br><br>
                <strong>You are connecting to me from:</strong> $REMOTE_ADDR<br><br>
                Click <a href = \"http://www.scriptschool.com\">here</a> to continue"
);

            } else { 
             
              
// This visitor has NOT come from my domain, so do NOT process the form
    
print("<strong><h5><font color='red'>Sorry, you must come from the known domain(<a href = \"http://www.timslan.com/scriptskewl/index.html\">here</a>)</font></h5></strong>
              <strong>Browser Type:</strong> $HTTP_USER_AGENT<br><br>
              <strong>Connecting from IP address:</strong> $REMOTE_ADDR <html></body>"
);
               exit();
            }
    }

?>





<pre>
</pre>
<br>
<iframe src='wk7basicsrc.php' width='100%' height='300'></iframe>
<br>

<a href='../index.html'>BACK</a>

</body>
</html>