Posted By

daipratt on 07/25/10


Tagged

Gravatar


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

osirisinternet


Get a users gravatar from their email address


 / Published in: PHP
 

  1. /******************
  2. *@email - Email address to show gravatar for
  3. *@size - size of gravatar
  4. *@default - URL of default gravatar to use
  5. *@rating - rating of Gravatar(G, PG, R, X)
  6. */
  7. function show_gravatar($email, $size, $default, $rating)
  8. {
  9. echo '<img src="http://www.gravatar.com/avatar.php?gravatar_id='.md5($email).
  10. '&default='.$default.'&size='.$size.'&rating='.$rating.'" width="'.$size.'px"
  11. height="'.$size.'px" />';
  12. }

Report this snippet  

You need to login to post a comment.