Using Gravatars In Your Script


SUBMITTED BY: Guest

DATE: June 12, 2013, 1:25 a.m.

FORMAT: PHP

SIZE: 467 Bytes

HITS: 1233

  1. <?php
  2. // source: http://www.apphp.com/index.php?snippet=php-using-gravatars-in-your-script
  3. function show_my_gravatar($email, $size, $default, $rating)
  4. {
  5. $params = '?gravatar_id='.md5($email).'&default='.$default.'&size='.$size.'&rating='.$rating;
  6. $output = '<img src="http://www.gravatar.com/avatar.php'.$params.'" width="'.$size.'px" height="'.$size.'px" />';
  7. echo $output;
  8. }
  9. ?>

comments powered by Disqus