Posts Tagged ‘php’

Working days

Saturday, May 31st, 2008

I’m all for reusable code. Whenever I’m coding, I’m constantly wondering if there’s a way that I can further abstract what I’ve done so I can use it somewhere else. Because of this, I came across a problem yesterday that got the better of me a little.

I’m working on a project at the moment that requires me to have an awareness of “working” days. Specifically, when a product is sold, the customer has three working days to cancel their order. This would be all well and good if there was 365 working days in the year, and all companies were the same. I started out with this assumption, but was quickly confounded.

Before I explain how I solved (well, only partially - it would require a calendar app to fully solve it to my satisfaction!) it, I’ll explain a little about how some classes come to be in my workflow. (more…)

PHP, mail() and OSX Leopard

Tuesday, May 20th, 2008

So I couldn’t figure out any way of doing this, and I can’t stand stuff like this beating me so I’ve been messing about with it for the last hour and it’s finally working so I thought I’d share what I’ve done. Maybe this will get spidered, but mostly it’ll be here for my future reference!

The long and short of this situation is that OSX includes sendmail, but it seems to be some sort of alias for postfix, so you should actually be configuring postfix. Right now, I should probably clear up that I’m by no means an expert on any of this and it’s all been trial and error for me so far so if it doesn’t work for you, I can try and help but I can’t promise anything. (more…)


Bad Behavior has blocked 119 access attempts in the last 7 days.