[thelist] Running php scripts from an email
Pete Prodoehl
pete.prodoehl at cygnusinteractive.com
Tue Oct 14 15:45:02 CDT 2003
Dunstan Orchard wrote:
>>>Dunstan wrote:
>>>
>>>When someone posts a comment to my blog (not that that happens very often)
>>>my php scripts send me an email alerting me of the event.
>>>
>>>If the comment is spam I'd like to be able to reply to the email and have my
>>>server run another php script to delete that record from my mysql db.
>
>
>>Marek Kilimajer wrote:
>>
>>You don't need any of those, just working php. In your alert email
>>provide yourself a link that will point to a php script on your site
>>that will delete the offending post:
>>
>>http://yoursite.net/delete_post?post_id=2234&secret_string=asdui34238d
>>
>>The secret string can be just one for all posts all for added security
>>generate new one for each post.
>>
>>If you have admin interface you might not need to do even that, jast
>>mail yourself the same link that is in the admin interface.
>
>
> *slap forehead*
>
> oh yes, that's a much simpler solution, thanks Marek.
>
> I think I got a bit carried away with technology :o)
>
> Still, if anyone could answer my question, for future reference, I'd be
> interested. If not then no worries.
Well, if you've got procmail installed on your mail server it's fairly
simple to feed incoming mail into a script (php, perl, etc) that can
process it.
Pete
More information about the thelist
mailing list