All URLs on Gravatar are based on the use of the hashed value of an email address. According to their best practice you should:
- Trim leading and trailing whitespace from an email address
- Force all characters to lower-case
- md5 hash the final string
Of course in PHP this is trivial as the following function shows:
function fetchGravatar() {
$fetchHash = md5(strtolower(trim('your_email.address.com')));
$GravatarImage = 'http://www.gravatar.com/avatar/' . $fetchHash;
return $GravatarImage;
}
Profiles are also available if you require them.