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 do I get my chat script to include the contents of the msg file in real time instead of only when the page is refreshed?How to expire cookies when user pressed a button in webpage? I want have a link in my website then delete cookies.
Help : how to automatically upload files every 5 minutes ? Hi , Can anybody help me with this php code : I want to read the file names from a folder ( word document files or media files with extentions) and enter the url of the files in mysql d
Hello - I am writing a PHP program to control an external camera connected to the USB port. For example I issue commands such as 'up', 'down', etc via an external program that I call using exec("cameracontrol.exe"). I would like to store
is there any sendemail function in php for sending contents of a form through email?
