经测试代码如下:
/******************
*@email - Email address to show gravatar for
*@size - size of gravatar
*@default - URL of default gravatar to use
*@rating - rating of Gravatar(G,PG,R,X)
* 使用 Gravatar 通用头像
*
* @param
* @author 编程之家 jb51.cc jb51.cc
**/
function show_gravatar($email,$size,$default,$rating)
{
echo '<img src="http://www.gravatar.com/avatar.PHP?gravatar_id='.md5($email).
'&default='.$default.'&size='.$size.'&rating='.$rating.'" width="'.$size.'px"
height="'.$size.'px" />';
}
/*** 代码来自编程之家 jb51.cc(jb51.cc) ***/