gebruik php versie 4.1.2.
heb niet de mogelijkheid om upgrade te doen.
Ik krijg deze traceroute niet aan't werk.
als ik 127.0.0.1 gebruik werk hij wel, maar andere domeinnamen(bv
www.php.net) krijg ik gewoon "done".
Iemand een idee.
Server is Apache op Linux dus deze instelling is juist.
Iemand?
<?php
$unix = 1; //set this to 1 if you are on a *unix system
$windows = 0; //set this to 1 if you are on a windows system
//globals on or off ?
$register_globals = (bool) ini_get('register_gobals');
$system = ini_get('system');
$unix = (bool) $unix;
$win = (bool) $windows;
//
If ($register_globals)
{
$ip = getenv(REMOTE_ADDR);
$self = $PHP_SELF;
}
else
{
$submit = $_GET['sending'];
$host = $_GET['host'];
$ip = $_SERVER['REMOTE_ADDR'];
$self = $_SERVER['PHP_SELF'];
};
// form submitted ?
If ($sending == 1)
{
// replace bad chars
$host= preg_replace ("/[^A-Za-z0-9.]/","",$host);
echo '<body bgcolor="********" text="#000000"></body>';
echo("Trace Output:<br>");
echo '<pre>';
//check target IP or domain
if ($unix)
{
echo "test";
system ("traceroute '$host'");
system("killall -q traceroute");// kill all traceroute processes in
case there are some stalled ones or use echo 'traceroute' to execute without
shell
}
else
{
system("tracert $host");
}
echo '</pre>';
echo 'done ...';
}
else
{
echo '<body bgcolor="********" text="#000000"></body>';
echo '<p><font size="2">Your IP is: '.$ip.'</font></p>';
echo '<form methode="post" action="'.$self.'">';
echo '<input type="hidden" name="sending" value="1">';
echo ' Enter IP or Host <input type="text" name="host"
value="'.$ip.'"></input>';
echo ' <input type="submit" name="submit"
value="Traceroute!"></input>';
echo '</form>';
echo '<br><b>'.$system.'</b>';
echo '</body></html>';
}
?>
--
+++-BigBuddha-+++
---------------------------
---www.bigbuddha.be---
---------------------------
"Light is faster than sound. Thats why people look intelligent untill you
hear them speak."

Likes:

Quote