| <?php |
| /******************************************************************************* |
| * Copyright (c) 2013 Eclipse Foundation and others. |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| * Contributors: |
| * Denis Roy (Eclipse Foundation)- initial API and implementation |
| *******************************************************************************/ |
| |
| require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/app.class.php"); |
| require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/nav.class.php"); |
| require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/menu.class.php"); |
| $App = new App(); |
| $Nav = new Nav(); |
| $Menu = new Menu(); |
| include("_projectCommon.php"); |
| |
| $pageTitle = "IP/DNS Test"; |
| $pageKeywords = ""; |
| $pageAuthor = "Eclipse Foundation, Inc."; |
| header("Content-type: text/html; charset=utf-8"); |
| header("Cache-Control: no-cache, must-revalidate"); |
| |
| # require session for this page |
| $Session = $App->useSession(true); |
| ob_start(); |
| ?> |
| <div id="maincontent"> |
| <div id="midcolumn" style="width: 678px;"> |
| <h1><?=$pageTitle ?></h1> |
| |
| <?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 SSH connections to experience lookup delays!</font>'; |
| } |
| else { |
| echo '<font size="+2" color="green">Your DNS seems okay!</font>'; |
| } |
| ?> |
| </p><p> |
| <a href="../../site_login/myaccount.php">< Back to My Account</a> |
| </p></div></div> |
| |
| <?php |
| $html = ob_get_contents(); |
| ob_end_clean(); |
| $App->generatePage($theme, $Menu, $Nav, $pageAuthor, $pageKeywords, $pageTitle, $html); |
| ?> |