Further Lottery Site Automation
18:33.20 - Sunday 15th January 2006 (Link to This Entry)
Tonight I spent a few moments automating some more of my new Lottery Results so that I could leave it going while I went about doing other stuff. Tonight it was the turn of the 'results email batch send' to get the automation treatment.
The first part of this was to take the script I'd already written and turn it into a function. I only have to supply it with two variables (the draw type and the date) and it'll go off and churn out email for everyone who wants it. All other variables can be deduced or extracted from tables using just these two items, so it's pretty easy to plug into my script.
The next part was to have all these email sent out without overloading the server. From past experience I can only send out 2000 or so messages sing mail() before something breaks (sendmail, possibly). My way around this is to bang as many messages as I need into a MySQL table and use this as a mail queue. A simply cron job checks this mail queue every 15 minutes and sends anything that needs sending, up to a current maximum of 100 messages. I will eventually build some mail tracking web-bug into the emails so that I can mark the ones that are read, and possily remove people who are not reading their mail from the mailouts.
I should know if this is working or not by tomorrow's draw.
Catwoman
21:55.59 - Sunday 15th January 2006 (Link to This Entry)
Oh dear, I just wasted almost 2 hours watching this drivel on Sky Movies. I thought to myself "it can't be that bad, surely?" Sadly, it was worse. This is possibly the worst film I have had the misfortune to see in the past ten years (and that's including Pitch Black): bad acting; bad premise; bad effects; bad dialogue and generally bad everything done very badly indeed. Avoid. 2/10.
Discuss this travesty here.
