How to build a url of a GRAVATAR image from a given email
Use this:
$userMail = whatever_to_get_the_email;
$imageWidth = '150'; //The image size
$imgUrl = 'http://www.gravatar.com/avatar/'.md5($userMail).'fs='.$imageWidth;
You can find a sample script with PHP code on their implementation site: http://en.gravatar.com/site/implement/php