Web-based MTR Script

Few days ago I helped my friend to write a web-based MTR, and here is the script:

<form action="index.php" method="get">
Address <input type=text name=address /> Counter <input type=text name=counter size=4 value=15> <input type=submit value=go />


if (strlen($_GET[address]) > 0
&amp;&amp;  $_GET[address] != 'localhost'
&amp;&amp; $_GET[address] != ''
&amp;&amp; $_GET[address] != ''
&amp;&amp; $_GET[counter] <= 50) {
$output = shell_exec('mtr '.$_GET[address].' -r -c '.$_GET[counter]);
echo "<pre>$output</pre>";


The script will execute shell command similar to:

$ mtr <host> -r -c <counter>


  • mtr script
  • freebsd mtr scripts
  • https://yandex ru/clck/jsredir?from=yandex ru;search;web;;&text=&etext=1829 3OG_JKu5ilknV1BJsoQaaBT5qeK68nrabHGEoi7OrkEwXhAmUL8pfTK_C4hgrxWO 77954e378042c95f3ce479db76d069ee55766c60&uuid=&state=_BLhILn4SxNIvvL0W45KSic66uCIg23qh8iRG98qeIXme
  1. james Reply

Leave a Reply

Your email address will not be published. Required fields are marked *