I have been looking arund at implementing Gravatar for all my users profile pictures but I am a little confused about one or two things.
Imagine, like this site, I have a current user who is not registered with gravatar. In order to give them a gravatar, do I have to tell them to register with gravatar separately or is there a API function that will register them if they do not yet exis开发者_StackOverflow中文版t?
Also I only ever see getting information from gravatar but I do not very often see putting information to their services, like a new avatar. Is there functions for putting data to their servers?
Normally, you'd use one of the default image options (see http://en.gravatar.com/site/implement/images/). If a gravatar doesn't exist one will be provided based on your settings (until the user actually selects / creates a gravatar). I'd keep the uploading of images on their site, but you could use their xml-rpc api
Put an image tag use the source similar to these
<img src="http://www.gravatar.com/avatar/<?php echo md5($_POST['email']);?>
精彩评论