From 382a8258642a6465ce3f5a67f68ea9cbbe27326d Mon Sep 17 00:00:00 2001
From: david_williams <david_williams>
Date: Sat, 18 Oct 2008 07:38:36 +0000
Subject: [PATCH] handy ip test

---
 downloadsites/webtools/artifacts/ip_test.php | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100644 downloadsites/webtools/artifacts/ip_test.php

diff --git a/downloadsites/webtools/artifacts/ip_test.php b/downloadsites/webtools/artifacts/ip_test.php
new file mode 100644
index 000000000..ca01b9643
--- /dev/null
+++ b/downloadsites/webtools/artifacts/ip_test.php
@@ -0,0 +1,15 @@
+<?php
+    echo "Your IP: " . $_SERVER['REMOTE_ADDR'] . "<br />";
+    $hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']);
+    echo "Your hostname (reverse lookup): " . $hostname . "<br />";
+    $ip = gethostbyname($hostname);
+    echo "Your hostname's IP (forward lookup of your reverse lookup): " . $ip . "<br />";
+    
+    if($ip != $_SERVER['REMOTE_ADDR']) {
+        echo "<font size=\"+4\" color=\"red\">Your DNS is broken. This may cause your connection to CVS to be slow!</font>";
+    }
+    else {
+        echo "<font size=\"+2\" color=\"green\">Your DNS seems okay! Thanks!</font>";
+    }
+    
+?>
\ No newline at end of file
-- 
GitLab