|
|
Reading Email with PHP and IMAP/POP3
|
Friday, 20 April 07, 10:03 am
Rich
|
Sending email is very simple in PHP, thanks to the mail() function. So what about receiving it? Obviously this would be useful for webmail, but my intention is to allow remote control of a PHP app, which is restricted to specific IPs.
The idea is this:- Check at set intervals for email from a specific sender containing a specific phrase
- Send an email to that sender containing a unique code and asking for confirmation by reply (this is to guard against emails with false sender info)
- Check for a reply from that sender containing the unique code
- Allow the user remote access
This back-and-forth palava is overkill for most operations but for my situation it provides sufficient security to prevent a reasonably determined hacker exploiting it to gain remote access (even if they did manage to fool it, they would still need the user's loginname and password to get in). |
|
|
|
|
|
Rich
10:36 am, Friday, 20 April 07
|
|
|
Rich
2:15 pm, Friday, 20 April 07
|
|
|
|
|
Leave Comment
|
|