rahuul Posted March 16, 2010 Share Posted March 16, 2010 hi all, pls can some one tell how to get remote domain name like "www.yahoo.com". $_SERVER['REMOTE_ADDR'] gives remort ip address of system like wise i want to fetch remote domain name. i tried gethostbyaddr($_SERVER['REMOTE_ADDR']); but it doesn't give the disered result pls help thanks Link to comment https://forums.phpfreaks.com/topic/195432-get-domain-name-in-php/ Share on other sites More sharing options...
aeroswat Posted March 16, 2010 Share Posted March 16, 2010 $_SERVER['HTTP_HOST'] Link to comment https://forums.phpfreaks.com/topic/195432-get-domain-name-in-php/#findComment-1026934 Share on other sites More sharing options...
rahuul Posted March 16, 2010 Author Share Posted March 16, 2010 thanks for your reply. I want to get domain name of website which will use my link. for eg: I have a code on "www.xyz.com/test.php" which do some processing. second website "www.abc.com" uses link "www.xyz.com/test.php" on its web page to display some content. i want to track "www.abc.com". Link to comment https://forums.phpfreaks.com/topic/195432-get-domain-name-in-php/#findComment-1026939 Share on other sites More sharing options...
aeroswat Posted March 16, 2010 Share Posted March 16, 2010 $_SERVER['HTTP_REFERER'] Link to comment https://forums.phpfreaks.com/topic/195432-get-domain-name-in-php/#findComment-1026943 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.