$lang = "en"; $title = "IP and DNS tools"; include "header.php"; //Get the data required for display $user_ip = getenv('REMOTE_ADDR'); if (isset($_GET['get_dns'])) $dns = gethostbyaddr($_GET['ip']); if (isset($_GET['get_ip'])) $ip = gethostbyname($_GET['dns']); ?>
If you want to host some sort of communication, such as an online game or webcam session, this is the address that you must give to someone else who needs to connect to your computer. Some of the software, who gives you that information directly, will report a wrong address if you are behind a router or firewall. Getting your IP address from a website such as this one ensures it's validity.
Result: The DNS data returned for the IP address $_GET[ip] is $dns.
"; if (isset($_GET['get_ip'])) echo "Result: The IP address returned for the DNS data $_GET[dns] is $ip.
"; ?>
Convert IP → DNSEnter an IP address below in the XXX.XXX.XXX.XXX |
Convert DNS → IPEnter a DNS data below to get the matching IP address. |