PHP Class for the Basecamp API

Today I worked on a php class called Basecamp to interact with the Basecamp API.

My motivation came from a client who really wants to watch the time I put into his project. So, I am setting up my time tracking software Timelog 4 to routinely create messages in his Basecamp project (via this class and some other code), which let him know the time spent during period x. I think it’s a stellar idea for clients to be able to monitor time in this way, however I didn’t want to deal with the legwork of manually doing it. And since I haven’t used the time tracking feature at Basecamp because I’m already invested in Timelog 4, this was my solution. At the time of this writing, my class will create messages and comments with or without file attachments and/or email notifications, and create todo items. I will expand it’s functionality if the need arises.

The zip file contains the class as well as usage examples. I offer the code to the world now in hopes someone can use it to their benefit. Special thanks goes to Prattski whose initial code snippet helped me get started this morning.

Click here to download the code