If I want to make a check on a script.. that makes only one host to be able to run this script.. I want to make $referer = "name.com"; so.. i wonder how the check must be..? how do i get only name.com from the $REMOTE_ADDR ?? is it $REMOTE_ADDR..? hope anyone can tell me this..?
Well the $HTTP_HOST or the $HOSTNAME both contain the name of the host.
doing something like
$host = substr(strstr($HTTP_HOST,"="),1); if($host != "myhost.com") { echo "Don't even try it"; die; }