.
*
* Version 0.1
* Author: Octavio Benedi Sanchez
*/
//set_time_limit (20);
if (file_exists("../data/url.php"))
{
include_once '../data/url.php';
// Remove file to allow other use it or to avoid bad use of plugin.
unlink("../data/url.php");
//echo "url:".$url."
interface:".$interface."
";
echo 'traceroute '.escapeshellarg($url).' -i '.escapeshellarg($interface);
flush();
//$fp=popen('traceroute '.escapeshellarg($url).' -i '.escapeshellarg($interface),"r");
$fp=popen('traceroute '.escapeshellarg($url),"r");
echo "
"; while (!feof($fp)) { $results = fgets($fp, 256); if (strlen($results) == 0) { // stop the browser timing out echo " "; flush(); } else { echo $results; flush(); } // avoid a busy wait sleep(1); } echo "Traceroute finished."; } ?>