$host resolved to "; if ($host == $host_name) { echo "$host_ip

"; } else { echo "$host_name

"; } } // Function to perform a whois lookup on the machine's ip address function whois_ip($whois_ip_server, $whois_ip_port, $do_echo) { if (eregi("^[a-z0-9\:\.\-]+$", $whois_ip_server)) { global $host_ip; // The whois server "whois.ripe.net" requires a "+" flag to get all the details if ($whois_ip_server == 'whois.ripe.net') { $whois_ip_server .= ' +'; } // Set a variable containing the command to be sent to the system $command = "whois -h $whois_ip_server $host_ip"; // If we passed a specific port to this function to connect to, add the necessary info to the command if ($whois_ip_port > 0) { $command .= " -p $whois_ip_port"; } // Send the whois command to the system // Normally, the shell_exec function does not report STDERR messages. The "2>&1" option tells the system // to pipe STDERR to STDOUT so if there is an error, we can see it. $fp = shell_exec("$command 2>&1"); // If the $do_echo variable is set to "TRUE", send the results to the parse_output() function... if ($do_echo == 'TRUE') { $output = 'Whois (IP) Results:
'; $output .= '
'; $output .= nl2br(htmlentities(trim($fp))); $output .= '
'; parse_output($output); } // ...otherwise, return the results in a variable (i.e. for the ip_to_country() function) else { return $fp; } } else { echo 'Whois (IP) Results:
'; echo '
'; echo 'Invalid character(s) in the Whois (IP) Server field.'; echo '
'; } } // Function to perform a whois lookup on a domain function whois_domain($host, $whois_domain_server) { if (eregi("^[a-z0-9\.\-]+$", $whois_domain_server)) { global $host_name, $host_ip; // Set the default value for a variable $whois_host = $host; // Split the host into its domain levels $split_host = explode('.', $host_name); // If the host name contains "www", remove it if ($split_host[0] == 'www') { array_shift($split_host); $whois_host = implode(".", $split_host); } // If searching a japanese whois server, use the "/e" switch to suppress japanese characters in the output if (substr($whois_domain_server, -3) == '.jp') { $whois_host .= '/e'; } // Set a variable containing the command to be sent to the system $command = "whois -h $whois_domain_server $whois_host"; // Send the whois command to the system // Normally, the shell_exec function does not report STDERR messages. The "2>&1" option tells the system // to pipe STDERR to STDOUT so if there is an error, we can see it. $fp = shell_exec("$command 2>&1"); // Save the results as a variable and send to the parse_output() function $output = 'Whois (Domain) Results:
'; $output .= '
'; $output .= nl2br(htmlentities(trim($fp))); $output .= '
'; parse_output($output); } else { echo 'Whois (Domain) Results:
'; echo '
'; echo 'Invalid character(s) in the Whois (Domain) Server field.'; echo '
'; } } // Function to perform an NS Lookup on a host/ip function nslookup($host) { // Set initial command to be run on the server $command = "nslookup $host -sil"; // Send the nslookup command to the system // Normally, the shell_exec function does not report STDERR messages. The "2>&1" option tells the system // to pipe STDERR to STDOUT so if there is an error, we can see it. $fp = shell_exec("$command 2>&1"); // Save the results as a variable and send to the parse_output() function $output = 'NS Lookup Results:
'; $output .= '
'; $output .= nl2br(htmlentities(trim($fp))); $output .= '
'; parse_output($output); } // Function to perform a dig on a host/ip function dig($host, $dig_class, $dig_server) { if (eregi("^[a-z0-9\.\-]*$", $dig_server)) { // Set initial command to be run on the server $command = "dig -t $dig_class $host"; // If a dig server has been entered, add the necessary info to the command if ($dig_server) { $command .= ' @' . $dig_server; } // Send the dig command to the system // Normally, the shell_exec function does not report STDERR messages. The "2>&1" option tells the system // to pipe STDERR to STDOUT so if there is an error, we can see it. $fp = shell_exec("$command 2>&1"); // Save the results as a variable and send to the parse_output() function $output = "Dig Results ($dig_class):
"; $output .= '
'; $output .= nl2br(htmlentities(trim($fp))); $output .= '
'; parse_output($output); } else { echo "Dig Results ($dig_class):
"; echo '
'; echo 'Invalid characters in the Dig Server field.'; echo '
'; } } // Function to perform a ping on a host/ip function ping($host, $ping_count) { // Set initial command to be run on the server $command = "ping -c $ping_count $host"; // Send the ping command to the system. // Normally, the shell_exec function does not report STDERR messages. The "2>&1" option tells the system // to pipe STDERR to STDOUT so if there is an error, we can see it. $fp = shell_exec("$command 2>&1"); // Save the results as a variable and send to the parse_output() function $output = 'Ping Results:
'; $output .= '
'; $output .= nl2br(htmlentities(trim($fp))); $output .= '
'; parse_output($output); } // Function to perform a traceroute on a host/ip function traceroute($host) { // Set initial command to be run on the server $command = "traceroute $host"; // Send the traceroute command to the system. // Normally, the shell_exec function does not report STDERR messages. The "2>&1" option tells the system // to pipe STDERR to STDOUT so if there is an error, we can see it. $fp = shell_exec("$command 2>&1"); // Save the results as a variable and send to the parse_output() function $output = 'Traceroute Results:
'; $output .= '
'; $output .= nl2br(htmlentities(trim($fp))); $output .= '
'; parse_output($output); } // Function to perform a tracepath on a host/ip function tracepath($host) { // Set initial command to be run on the server $command = "tracepath $host"; // Send the tracepath command to the system. // Normally, the shell_exec function does not report STDERR messages. The "2>&1" option tells the system // to pipe STDERR to STDOUT so if there is an error, we can see it. $fp = shell_exec("$command 2>&1"); // Save the results as a variable and send to the parse_output() function $output = 'Tracepath Results:
'; $output .= '
'; $output .= nl2br(htmlentities(trim($fp))); $output .= '
'; parse_output($output); } // Function to parse the results of various commands to create shortcut links function parse_output($input) { // Create a regular expression to validate email addresses // (credit goes to "bobocop at bobocop dot cz" from "eregi" comments on php.net for this regular expression) $user = '[-a-z0-9!#$%&\'*+/=?^_`{|}~]'; $domain = '([a-z]([-a-z0-9]*[a-z0-9]+)?)'; $regex = $user . '+(\.' . $user . '+)*@(' . $domain . '{1,63}\.)+' . $domain . '{2,63}'; // Convert IP addresses to links $output = eregi_replace("([0-9]{1,3}(\.[0-9]{1,3}){3})", "\\0", $input); // Convert email addresses to links $output = eregi_replace($regex, "\\0", $output); // Print the results echo $output; } // Set the default value for certain variables if (!$host) { $host = 'Enter Host or IP'; } if (!$whois_ip_server) { $whois_ip_server = 'whois.ripe.net'; } if (!$whois_domain_server) { $whois_domain_server = 'whois-servers.net'; } if (!$ping_count) { $ping_count = '4'; } if (!$scan_timeout) { $scan_timeout = '1'; } // Call the get_ip() function and store the results in $ip $ip = get_ip(); ?> UK Grid : AS 39757 : ISP : London : Manchester : Colocation
The UK Grid Network LTD

IP Tools


Your internet facing IP address is:

$ip"; ?>

To use the tools below against your IP address please click on the IP address link. Alternatively if you want to run the tools below on a different IP address please enter it into the Host box below.

Host:     
>Resolve Host / Reverse Lookup
>Ping  -  count:
>Traceroute
>Whois (IP)  
>NS Lookup        Timeout:   second(s)
>Dig      

You must select at least one option to perform.'; exit; } // If there was no host entered, print an error if (($host == 'Enter Host or IP') || ($host == "")) { echo '

You must enter a valid Host or IP address.'; exit; } // Make sure there are no invalid characters in the host field - if so, print error and stop script if (!eregi("^[-a-z0-9\.\?\&:/@#]+$", $host)) { echo '
Invalid character(s) in the Host field.
'; exit; } // Print links to collapse and expand all results echo ''; echo '[Collapse All] '; echo '[Expand All]'; echo '

'; // If a URL was entered into the Host field, call the split_url() function if (eregi("^https?://", $host)) { split_url($host); // Re-set the $host variable to just the domain portion of the URL so the other functions can do their thing $host = $url_parts['host']; } // If the option is set to log the user info, call the log_user() function if ($enable_log_user == TRUE) { log_user($host); } } // If an option is set, call its respective function if (isset($resolve)) { resolve($host); } if (isset($ip_to_country)) { ip_to_country(); } if (isset($whois_ip)) { whois_ip($whois_ip_server, '-1', 'TRUE'); } if (isset($whois_domain)) { whois_domain($host, $whois_domain_server); } if (isset($ns)) { nslookup($host); } if (isset($dig)) { dig($host, $dig_class, $dig_server); } if (isset($http_req)) { http_req($http_type); } if (isset($ping)) { ping($host, $ping_count); } if (isset($trace)) { traceroute($host); } if (isset($tracepath)) { tracepath($host); } ?>

Peering Email

peering [ at ] ukgrid.net


NOC Email

noc [ at ] ukgrid.net


NOC Phone

+44 (0)845 260 4743

© 2004 - 2008 The UK Grid Network Ltd. All trademarks, tradenames, and service marks mentioned and/or used belong to their respective owners.

Terms  |  Privacy  |  About Us  | Site Design: The UK Grid Network LTD

QMS ISO9001:2000 RIPE NCC LINX LoNAP Lipex MaNAP ISPA MCIX Cisco QMS ISO9001:2000