First things first get yourself signed up on bit.ly to receive an API key.

Once you have signed up you can use this PHP function to create links automatically (you will need to provide the bit.ly username and API key as well as the URL).

<?php
function create_bitly_link($apikey, $username, $url) {
	$ch = curl_init("http://api.bit.ly/shorten?version=2.0.1&longUrl=".urlencode($url)."&login=".$username."&apiKey=".$apikey);
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
	curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
	curl_setopt($ch, CURLOPT_TIMEOUT, 15);
	$data = curl_exec($ch);
	curl_close($ch);
	if (preg_match('/<shortUrl>(.+?)<\/shortUrl>/is', $data, $m)) {
		return $m[1];
	}
	else {
		return false;
	}
}