| 9:36 am on Jun 8, 2012 (gmt 0)|
It's quite trivial really.
Write the original contents in a file named email_address.txt and when they confirm it rename it to confirmed_email_address.
I'd probably use an MD5 version of the email address to avoid the special characters that can be in email addresses that can cause trouble.
| 3:52 pm on Jun 8, 2012 (gmt 0)|
The tools you will use are PHP mail() [php.net] and file_get_contents() [us2.php.net] or if you're on an old version of PHP, fopen() [us2.php.net] and related functions described in See Also section.
You'd likely have two scripts, one to initiate the mail and store the email in the first file, one to receive the input from the email link.
I would also suggest storing this file in a location inaccessible from the web and only from your script to avoid someone stumbling on it and mining your email addresses.
| 1:10 am on Jun 11, 2012 (gmt 0)|
What would an inaccessible folder be, one such as cgi-bin maybe?
| 4:11 pm on Jun 11, 2012 (gmt 0)|
Generally no. cgi-bin is usually for CGI executables or scripts. For example, on some systems perl scripts will only execute if they reside in the cgi-bin directory, but it's still accessible via the web.
It depends on the setup. Your "visible" (from the web) might reside in public_html, so you possibly have
Of those, only "_private" is a viable location within the "public_html" directory to store such files. It's not browsable, that's why it's "private."
Even that may have issues, another approach might be to store the file somewhere **outside** public_html, if you can and are allowed.
This is just one setup, like I said it depends on the system.
| 4:37 pm on Jun 11, 2012 (gmt 0)|
Unfortunately I don't. Is there a way to do it with .htaccess?
| 2:31 pm on Jun 12, 2012 (gmt 0)|
You can restrict access to a directory or even a file using Apache configuration directives. See the following resources for more information:
| 2:42 pm on Jun 12, 2012 (gmt 0)|
|fredfletcher wrote: |
Note: SQL or other database option, is not an option unfortunately.
Not even SQLite?
| 2:01 am on Jun 13, 2012 (gmt 0)|
@Ryan - SQLite might be an option. Am looking into it, thanks.
| 2:02 am on Jun 13, 2012 (gmt 0)|
Thanks for the info Coopster