php-ping.php script is not working and i am not getting the output, only blank page is showing. While file upload script is working fine. why this is happening, can any one is having any idea. My fedora is Fedora Rc2
<?php
$max_count = "10"; //maximum count for ping command
$cmd = "ping -t"; // unix (unix means all flavors of linux as well)
If (isset($_POST['submit'])) {
If ($_POST['count'] > $max_count)
{
echo 'Maximum for count is '.$max_count;
echo '<a href="10.10.0.12">Back</a>';
$again = True;
}
else
{
If (ereg(" ",$_POST['host']))
{
echo 'No Space in Host field allowed !';
echo '<a href="10.10.0.12">Back</a>';
$again= True;
}
else
{
echo("<b><font color=\"00cf10\">Connectivity Test to a Subscriber in Zone I Output:</font></b><br>");
echo("<pre>");
// $host = escapeshellarg($_POST['host']);
// $count = escapeshellarg($_POST['count']);
$host = $_POST['host'];
$count = $_POST['count'];
// print"$cmd $count $host";
system("$cmd $count $host", $list);
echo("</pre>");
}
}
}
else
{
?>
<html>
<title>This site is Designed and Maintained by Swamy</title>
<body>
<h3><font color=\"00cf10\">Connectivity Test to a Subscriber in Zone I</font></h3>
<h4><font color=\"00cf8\">IP Address in Banjara Hills, series should be ---172.25.0.0</font></h4>
<h4><font color=\"00cf8\">IP Address in Khairatabad/Somajiguda/Erramanzil, series should be ----172.26.0.0</font></h4>
<form method="POST" action="<?php echo $_SERVER['PHP_SELF']; ?>">
Enter IP or Host <input type="text" name="host"></input>
Enter Count <input type="text" name="count" size="2" value="4"></input>
<input type="submit" name="submit" value="Test"></input>
</form>
<?php
}
?>
<a href="/downloads/index.php"><img src=images/alerts.gif width=36 height=35 border=1 alt="Downloads"></a>
</body></html>