In a recent post talking about a library he's developed to interface with Twitter - TwitterData - and some examples of it in use.
I recently created a small library for working with twitterdata in PHP. Sources are available from GitHub: php-twitterdata. Twitter Data is a simple, open, semi-structured format for embedding machine-readable, yet human-friendly, data in Twitter messages. This data can then be transmitted, received, and interpreted in real time by powerful new kinds of applications built on the Twitter platform.
He includes code snippets showing how to connect to Twitter, set up messages to be sent, and grab current messages via the logged in account. You can get full details on the tool from the TwitterData site.