sorry for the late reply..I didn't receive any email notification...
how about this...works fine, but don't know if anyone can think of a better way...I certainly thought of like 3-4 diff ways of doing it, but this seemed the best.
$ip = $_SERVER['REMOTE_ADDR'];
$ctime = time();
$db = 'db.txt';
/*This function will return true if ip was posted here in the past 60 seconds */
function checkIP()
{
global $ip, $ctime, $db;
$match = false;
$lines = file($db);
$handle = fopen($db,"w") ;
foreach($lines as $line)
{
list($thisip, $thistime ) = explode( "|" , $line );
if ( $thistime > $ctime-60 ) {
if ( $thisip == $ip ) $match = true;
fwrite($handle, "{$thisip}|{$thistime}\n");
}
}
fclose($handle);
return $match;
}