westdc-zf1/application/module/Users/Gravatar.php

20 lines
366 B
PHP
Raw Normal View History

2014-05-27 07:04:25 +00:00
<?php
namespace Users;
class Gravatar{
function Get( $email, $size='' ) {
$default = "http://heihedata.org/static/img/gCons/agent.png";
if(empty($size))
{
$size = 40;
}
$url = "http://www.gravatar.com/avatar/" . md5( strtolower( trim( $email ) ) ) . "?d=" . urlencode( $default ) . "&s=" . $size;
return $url;
}
}