Blogging by email – another way?
-
First, the usual newbie disclaimer. I am new not just to blogging, but also to PHP and WordPress. I started out with MT a few months ago. Just the wrong time, as it turned out.
Anyway.
One thing I would like to do is blog by email. I can’t, as I can’t CRON. Partly, I think this is because I can’t be bothered to learn how to CRONTAB. I have seen the tutorials but I am trying to learn PHP and to be honest, my brain doesn’t have room for two things.
So I thought – why not do the whole email update timecheck thing in PHP? I am not sure if this is a novel idea or (more likely) not, but this is more of a ‘request for comments’ type post I suppose.
Basically, my idea is this.- In index.php you have a little piece of code that writes the time and date of each access to a table in the database.
- A little after that, you have some PHP that deletes all but the two most recent entries from that table.
- The third piece of code does the work – it checks the time difference between the last two entries and keeps that as a cute little variable.
- In the setup pages, under the ‘blog by email’ you set an interval for the setup to check for new email posts (like a CRON interval). Call this x.
- Now the fourth bit of code takes the cute variable, and if it is bigger than x then it runs the emailing checking script, importing any new entries from the POP email box onto the page.
- Obviously, it cannot report the results to the page, as this will be the normal index page. However, it can send the information about the added entries in an email to the admin.
Now, the only downside I could see with this is that it may add to server-load. However, it isn’t clear to me that the extra load would be very intensive and certainly no more intensive than running a CRON thingy.
But wouldn’t this be a better way of doing things so that lazy people like me wouldn’t have to navigate the *nix shell?
I may be away from this board for a while (Finals exams for a fortnight from tomorrow) but genuinely interested as to whether this is a possibility as it would make email blogging a hell of a lot simpler, especially for those that can’t use CRON.
- The topic ‘Blogging by email – another way?’ is closed to new replies.