Skip to content
Snippets Groups Projects
Commit 382a8258 authored by david_williams's avatar david_williams
Browse files

handy ip test

parent c69daf96
No related branches found
No related tags found
No related merge requests found
<?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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment