
/**
* 获取Gravatar头像
* http://en.gravatar.com/site/implement/images/
* @param $email
* @param $s size
* @param $d default avatar
* @param $g
*/
function getGravatar($email, $s = 40, $d = 'mm', $g = 'g') {
$hash = md5($email);
$avatar = "http://www.gravatar.com/avatar/$hash?s=$s&d=$d&r=$g";
return $avatar;
}
感谢作者:尼玛博客的投稿,欢迎大家投稿: https://www.blogs.hk/post-87.html
相关阅读
留言咨询