für den Fall dass ich nicht der einzige bin, der das bis vorhin nicht wusste:
tinyurl.com hat auch eine API.
Die ist zwar unglaublich simpel, aber das ist doch auch mal schön.
$tinyURL = file_get_contents( 'http://tinyurl.com/api-create.php?url='.$tooLongURL );
und vice versa (hackish):
function reverse_tinyurl($url){
// Resolves a TinyURL.com encoded url to it's source.
$url = explode('.com/', $url);
$url = 'http://preview.tinyurl.com/'.$url[1];
$preview = file_get_contents($url);
preg_match('/redirecturl" href="(.*)">/', $preview, $matches);
return $matches[1];
}