How to find a domain name for an IP address?
To do this is easy in PHP as there is a built in function that accepts the IP address and will find the host name for you.
In order to do this, code like the below will help:
<?php
$ip = $REMOTE_ADDR;//capture IP
$domain = GetHostByName($ip);
?>
The variable $domain will now contain the hostname.
Comment on this Question and Answer >>>
ASK A QUESTION
More website PHP Questions
How can I use sessions in PHP?is there any sendemail function in php for sending contents of a form through email?
How can I access information sent through POST on a form?
How do I send HTTP headers with PHP?
my web site www.innovativephp.com is not configured properly to dns how can i do that?
