I needs your helps....
Posted: Thu Apr 14, 2005 10:16 pm
I want to use the exec code in PHP. What i want to is pingging the computer IP Address and also the computers in my network, then the result will be displayed in browser, either the IP is exist or not. Below is my code :
My problem is also in how to determine the the IP is exist or not. Which code that can be used to do that???..
Thanks advanced....
Code: Select all
<?php
if (isset($_POST[ip]))
{
$qq = $_POST[ip];
$lari = "ping " . $qq ;
$aa = exec($lari);
echo "IP " . $qq . " is exist";
}
else
{
?>
<html>
<head>
<title>For testing Only</title>
<h1>Pingging IP</h1>
</head>
<body>
Please enter the IP
<form name="ip" method="post" action="index.php">
<input type="text" name="ip">
<input type="submit" value="Enter">
</form>
</body>
</html>
<? } ?>Thanks advanced....