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

20 lines
366 B
PHP

<?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;
}
}