phpgravatar

How to build a url of a GRAVATAR image from a given email


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/avatar.php?email=myemail@myserver.com 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


Solution

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