Saturday, 28 September 2013

Getting users hoatname

Getting users hoatname

I'm trying to get the users hostname. but I can't find any script on this.
example if a user is sending _post from his domain to my domian.
This is writting in PHP
$Cus_hostname = $_SERVER['HTTP_REFERER']; echo $Cus_hostname;
This is giving me the total url. ex.
http://www.userdomain.com/bla/bla/index.html?
I only need the http://www.userdomain.com?
Can someone give me code for this issue. I have used 3 weeks for finding
and testing, but no result.
Thanks

No comments:

Post a Comment