a php traceroute gateway by >Jakob Hirsch(source)

invalid target!\n"; $target = ''; } } else { $target = ''; } ?>

" method="get"> '. $ver; } ?>

error: mtr not found\n"; } elseif (!chdir($dir)) { echo "error: switching to mtr dir failed\n"; } else { $cmd = array('./mtr', '--report', '--report-wide', # don't truncate hostnames '--first-ttl 2', # don't report first hop (hide) '--report-cycles 3', # number of requests '--mpls', # report MPLS information '--show-ips', # show IP addresses along with DNS names (only useful with --report-wide) ); if ($ipv === 4 or $ipv === 6) $cmd[] = "-$ipv"; $cmd[] = escapeshellarg($target); $cmd[] = '2>&1'; echo "
\n";
		$x = implode(' ', $cmd);
		#echo "cmdline: '$x'\n";
		$t0 = microtime(true);
		system($x);
		printf("
\nfinished (%.1f s).", (microtime(true)-$t0)); } } ?>