12-13-2009, 08:13 AM
The code you firstly posted never did overwrited the same IP, but was writing a new log.
What you now need to do is to read the lines to an array first and then use preg_match(_all) to check if there is a same IP and then replace that.
http://www.php.net/manual/en/function.preg-match.php
What you now need to do is to read the lines to an array first and then use preg_match(_all) to check if there is a same IP and then replace that.
http://www.php.net/manual/en/function.preg-match.php