PHP gravatar integration


SUBMITTED BY: Guest

DATE: Oct. 23, 2013, 9:11 a.m.

FORMAT: PHP

SIZE: 343 Bytes

HITS: 1027

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

comments powered by Disqus