Posted By

hasantayyar on 08/18/09


Tagged

php Gravatar


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

calvingilbert
umang_nine


use gravatar


 / Published in: PHP
 

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

Report this snippet  

You need to login to post a comment.