Jump to content

get domain name in php


rahuul

Recommended Posts

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

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".

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.