How to update blog by sending email using php
Like others have suggested, you suggested polling the mailbox to detect an incoming message, but it is much more efficient to get an MDA (mail delivery agent) to start the process when a message arrives - how you do this depends on how your mail is (on most Linux systems, procmail used for MDA, which provides all kinds of filtering, automatic replies, and execution functionality, otherwise the .forward files in the user's home directory can usually do at least part of the job).
In terms of parsing the message - it must contain one or more headers, separated by a newline character (or carriage return + newline), followed by at least one blank line, followed by a body. But you need to think about how you work with mime encoded content.
Regardless of how you receive the email, you still need to blog it.
Most blogging software supports some form of xmlrpc for adding posts - there the lib is posted at http://phpxmlrpc.sourceforge.net/
Take a look at the talk pages for examples of use as a client.
Failed - Try reverse engineering the form used to submit the new message.
FROM.
a source to share
You probably need to do socket programming to listen to an incoming email port and whenever you receive an email over the port (make sure you follow the correct protocols at higher levels) you can take the body and subject and post it in your blog database.
You will need to maintain the script in a loop. However, this kind of task is usually not done on a platform like PHP. You can use console applications to run on your server in C or C ++ to perform whatever tasks are more appropriate.
Allocate PHP to serve up your website / server front end.
a source to share
You can use a task scheduler like cron to periodically check for new emails and update the database.
Or use a web service like webcron http://www.webcron.org/ to run your cron-like script.
a source to share