Shorten URLs in strings with bit.ly
Here is a simple class that shortens the URLs within a string using the bit.ly shortening service. Example is at the bottom of the file.
If you only need to shorten a list of URLs (not within the string), then use the “shorten” function. Bitly api documentation is at http://code.google.com/p/bitly-api/wiki/ApiDocumentation .