Page 1 of 1

Domain verification

Posted: Wed Jul 02, 2003 11:44 am
by GK
How do i check if a domainname(domain.com) of a site running my script is the same as in a file?

example:

(de key file includes: domain.com)
how do i let it check if its the same as where its run from
$check=domain.com

if its not on domain.com it should go false

Posted: Wed Jul 02, 2003 11:58 am
by SBukoski
Have you looked at the $_SERVER variables? Seems like the $_SERVER["HTTP_HOST"] may be useful as it returns the domain name. or at least it did for me when I ran phpinfo() on my server.

Posted: Wed Jul 02, 2003 3:09 pm
by GK
ok but how do i get that output from http://www.realmaturesluts.com to realmaturesluts.com ?

<?
$domein = $_SERVER["HTTP_HOST"];
$remote = $_SERVER["REMOTE_ADDR"];
echo $domein;
echo $remote;
?>