kieranbarnes do you know where your towel is?

iCalendar Generation

Posted on July 20, 2007

One of my clients requested that the CRM applicationI wrote should interact with Outlook Calender.
For example, when adding a "Next Call Date" on the web based CRM application, the user's calendar is updated in Outlook so they are reminded even when not using the CRM application.

It should work for any VCalendar aware application, like Thunderbird & Lightning or Sunbird.
Heres how I did it,

Filed under: PHP Continue reading

CAPTCHA Image Generation Part 2

Posted on July 19, 2007

A quick morning hack - I added some random lines to try and confuse the automated processes. Its probably still not very secure but it's a start!

Add the following code below the last imagettftext() line.

Filed under: PHP Continue reading

CAPTCHA Image Generation

Posted on July 18, 2007

I couldn't find a very good CAPTCHA generation script in PHP, all the ones I looked at were ugly, over complicated or just rubbish! So I decided to write my own.

They may not be the most secure but at least they look decent!
I will progress this code over time to make the images and code more robush and secure. For now, it is just my ramblings scribbled down.

Filed under: PHP Continue reading

JPGraph Part 1

Posted on July 18, 2007

I really like JPGraph now. For too long I hated it as a clunky, bloated rather useless graphing library (Sorry!), but now I like it. Really like it.

Over the next few months I'll be doing a series of articles on using JPGraph.

For now, heres my favourite feature at the moment.

Filed under: PHP Continue reading

Nice print_r() for the web

Posted on July 18, 2007

Here's a nicer version of the print_r() function that displays much better on web pages.

Filed under: PHP Continue reading

Yahoo GeoLocation API

Posted on July 13, 2007

The Yahoo Maps API is the best API I've found for using on in internal site. Google won't let me access theirs from a non-public site.

Filed under: PHP Continue reading

imagegrabwindow() and imagegrabscreen()

Posted on July 13, 2007

I stumbled over these two new functions in the PHP CVS today. They are only available in Windows as they use COM, but interesting non the least.

Filed under: PHP Continue reading

Nicer Pagination with ADOdb

Posted on July 7, 2007

Or should that be Nicr? To follow in an annoying theme.

Olavo Alexandrino wrote a nice well rounded class for record set pagination in ADOdb. If you've ever used ADOdb's version, you will know it is not very good, to say the least.

Although Olavo did a fantastic job on the logic, the presentation left a little to be desired from my perspective.
I am providing my modifed version for download below, it provides a few logic updates and better presentation.

Idiot Proof Lightbox

Posted on July 7, 2007

I've just made some modifications to my Gallery code which is part of i9000's small site CMS software.
It adds some client side logic to make sure the images Lightbox 2 creates fit the users screen perfectly. Previous to this some customers were complaining that the images they uploaded were too big for their visitor's screen.

This allows us to present the largest possible image to the user without scrolling around the page.

Poor mans currency conversion

Posted on July 3, 2007

I recently completed a project that required currency conversion. I was limited what I could get out through the corporate firewall, so I came up with this.
It connects to Yahoo! with curl and reads a CSV string into memory.

Filed under: PHP Continue reading