I want to keep ips from visitors and place them on a file. I tried fwrite() function but I think it is rewrite on the previus ip on file.
Example.
ip.txt is
The 'advantage' of the database version is that no one can view the data. If neccesary, you can avoid access to the file by using a .htaccess file:
For apache 2.2
# Protect log.txt Order Allow,Deny Deny from all
For apache 2.4
# Protect log.txt Require all denied