Location: PHPKode > projects > Network Asset Management Archive > nama/locatenameforip.php
<?php
$now = date("m/j/y h:i:s",time());
include "connect.php";

$now = date("j/m/y h:i:s",time());
print '<META HTTP-EQUIV="refresh" CONTENT="900">';
print '<body bgcolor="#FFFFCC">';
echo "<BR>";
$sth = ibase_query($dbh, $stmt);
while ($row = ibase_fetch_object($sth)) {
      $netbios_name="";
      $mydata = "";
      exec("/usr/bin/machinename " . $row->IP_ADDRESS, $netbios_name);
      if (strlen($netbios_name[0])!=0) {
        $mydata = trim($netbios_name[0]);
        $stmt2 = "update arp_table set netbios_name = '$mydata' where serial = '
$row->SERIAL'; ";
        $sth2 = ibase_query ($dbh,$stmt2);
      }
      echo $row->IP_ADDRESS . "--->"  . $mydata . "<BR>";
}
ibase_free_result($sth);
ibase_close($dbh);
?>

Return current item: Network Asset Management Archive