$ip) { $list[$key] = trim($ip); } if (!in_array($theIP, $list)) { array_push($list, $theIP); mail( "you@somesite.com", "New IP Address", "{$theIP} -> " . gethostbyaddr($theIP), "From: me@mycomputer.com" ); exec("echo '{$theIP}' >> {$ips}"); } ?>