Web Hosting Talk







View Full Version : Updating via e-mail


tomsoc
07-04-2003, 09:21 AM
Hi, I'm not sure if anyone's already done something like this or not, but I'm just looking for a few suggestions/pointers.
Right I have a database-driven site, php/mysql and am wondering would it be possible to update the site via e-mail (i'm thinking a specific e-mail address and formatting of the mail etc).
The idea being I send an e-mail to address x, possibly a cron-job running every 5 minutes checks the mail and finds one in a specific format and then executes a script to add the content to the database.
Just really wondering if anyone has done something like this or what would be best way to start even. Or is my idea totally insane?
Thanks in advance

luki
07-04-2003, 01:52 PM
You can also do this with procmail, or if you are running qmail (not sure about others) you can pipe the mail message directly into a program of your choice, which could be a PHP or Perl program that will process the message and do the update.

I wonder about the security of this though... how can you be sure that the message is legit and truly comes from you, and does not have a spoofed address?

tomsoc
07-05-2003, 10:37 AM
Thanks for the reply.
Yes security would be a problem I know, but I was thinking again about specific parsing of the message, that some form of username/password would be included and to keep changing that.
It's still not fool-proof but might do the job I want.

kohashi
07-05-2003, 06:44 PM
Almost nothing is fool proof. I really like the idea though. That could be quite convinient during vacations and such.

luki
07-05-2003, 09:34 PM
That could be quite convinient during vacations and such. Naaahhh... the good ol' PuTTY and you're all set. From there you can do all the updating you need. And if you can't/don't want to download PuTTY, you can use a Java-based SSH client like this one: http://javassh.org/