blob: 814423bb7fd2c122c393c91d889093cd7d012a3e [file] [log] [blame]
david_williams1c3ae2702008-10-18 08:02:56 +00001<?php
2echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?> \n" ;
3
4ini_set("display_errors", "true");
5error_reporting (E_ALL);
6
7?>
david_williamsdf54d4c2008-10-18 07:49:21 +00008<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
9<html xmlns="http://www.w3.org/1999/xhtml">
10<head>
david_williams1c3ae2702008-10-18 08:02:56 +000011<meta
12 http-equiv="Content-Type"
13 content="text/html; charset=ISO-8859-1" />
david_williamsdf54d4c2008-10-18 07:49:21 +000014<title>IP Address Information</title>
15</head>
16<body>
17<?php
david_williams1c3ae2702008-10-18 08:02:56 +000018$yourIP = $_SERVER['REMOTE_ADDR'];
19$hostname = gethostbyaddr($yourIP);
20$ip = gethostbyname($hostname);
21$ipsMatch = ($ip == $yourIP);
22
23echo "Your IP: " . $yourIP . "<br />";
24echo "Your hostname (reverse lookup): " . $hostname . "<br />";
25echo "Your hostname's IP (forward lookup of your reverse lookup): " . $ip . "<br />";
26
27if( $ipsMatch ) {
28 echo "Your DNS seems okay!";
29}
30else {
31 echo "Your DNS is broken. This may cause your connection to CVS to be slow!";
32}
33
david_williamsdf54d4c2008-10-18 07:49:21 +000034?>
35</body>
36</html>