As others have said, write it outside of your website (i.e., inaccessible to the public).
Try the following: fwrite(fopen('../emaillist.txt', 'a+'), $delimiter . $email);(pay attention to ../emaillist.txt before). This will write the ONE email file located above your webroot, i.e. Instead, /home/user/public_html/emaillist.txtit will be located in /home/user/emaillist.txt, which will not be accessible via the Internet, but you will be able to see it via FTP.
source
share