Location: PHPKode > projects > Network Asset Management Archive > nama/newtoday.php
<?php

$fromdate = $_POST['fromdate'];
$iponly = $_POST['IPONLY'];
include "connect.php";
$now = date("j/m/y h:i:s",time());
if ($fromdate == '') {
   $fromdate = date("m/j/y h:i:s",time()-(60*60*24));
}
$stmt = "Select * FROM arp_table where (first_seen > '$fromdate') and (ip_address starts with '134.164') order by ipnum";
   $sth = ibase_query($dbh, $stmt);
   $message = '';
   while ($row = ibase_fetch_object($sth)) {
       $message .=  $row->IP_ADDRESS . '<br>';
   }
/* recipients */

$to  = "Ford <hide@address.com>"; 

/* subject */
$subject = "New Machines on network since " . $fromdate;

/* message */

/* To send HTML mail, you can set the Content-type header. */
$headers  = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";

/* additional headers */
$headers .= "From: Information Assurance <" . $fromemailaddress . ">\r\n";

#$headers .= "Bcc: hide@address.com\r\n";

/* and now mail it */
mail($to, $subject, $message, $headers);


?>
Return current item: Network Asset Management Archive