tags:

views:

34

answers:

2

There is a simple way with php, a simple script or URL manipulation to build a URL for the gravatar image corresponding to an email?

Ex. http://gravatar.com/avatars/[email protected] and this return a jpeg or png image.

If there is no simple way like the example, what is the easiest way you know to resolve a url of the gravatar corresponding to an email?. Thanks

+1  A: 

The root script is at http://www.gravatar.com/avatar/ The next part of the URL is the hexadecimal MD5 hash of the requested user's lowercased email address with all whitespace trimmed. You may add the proper file extension, but it's optional.

The complete API is here http://en.gravatar.com/site/implement/

Mikulas Dite
+1  A: 

You can find a sample script with PHP code on their implementation site: http://en.gravatar.com/site/implement/php

christian studer