martinjburgess
IS-IT--Management
Hi,
I would like to open and read a file that is in this format:
Time|Username|Email|IP
for example:
1345289299|Test|stinesofe@changesmile.org.ua|82.45.104.76
After reading a form input that includes $username and $ip, if the Email or IP are not listed in the file, then I would like to add these to the bottom of the file.
So:
open a file called spamlog
read the file
if either the IP or Email from the form exist then ignore
if either the IP or Email from the form are not listed the append the file with the new values.
Many thanks in advance.
I would like to open and read a file that is in this format:
Time|Username|Email|IP
for example:
1345289299|Test|stinesofe@changesmile.org.ua|82.45.104.76
After reading a form input that includes $username and $ip, if the Email or IP are not listed in the file, then I would like to add these to the bottom of the file.
So:
open a file called spamlog
read the file
if either the IP or Email from the form exist then ignore
if either the IP or Email from the form are not listed the append the file with the new values.
Many thanks in advance.