|
|
|
Get Gravatar Image
18
Get Gravatar Image
<?php
// Get gravatar URL
function GetGravatarURL($strEmail, $nSize, $strRating = "PG")
{
// Convert email
$strEmail = md5($strEmail);
// Default (SET FOR YOURSELF)
$strDefault = urlencode("http://www.mydomain.com/img/gravatar.png");
return "http://www.gravatar.com/avatar.php?gravatar_id=$strEmail&rating=$strRating&size=$nSize&default=$strDefault";
}
?>
// Get gravatar URL
function GetGravatarURL($strEmail, $nSize, $strRating = "PG")
{
// Convert email
$strEmail = md5($strEmail);
// Default (SET FOR YOURSELF)
$strDefault = urlencode("http://www.mydomain.com/img/gravatar.png");
return "http://www.gravatar.com/avatar.php?gravatar_id=$strEmail&rating=$strRating&size=$nSize&default=$strDefault";
}
?>




Clark
cissp
USA
From Harris Andreson of USA
colocation hosting
What is a Gravatar Image? This is new to me. Could you elaborate on what it is?
-----------------------
Proud owner of scriptsentials.com and the Scriptsentials network.
"A gravatar is a Globally Recognized AVATAR. They follow the user and display next to the users name everywhere the user posts on the web, assuming the website has enabled them. Gravatars are rated with the MPAA-style system, making it possible for website owners to decide what's appropriate for the viewer to see."
and, just incase:
"A Forum Avatar is a small image that portrays an interest or liking of the user, or in some cases the user him or herself. Its name is derived from the novel Snow Crash, in which the term "avatar" is used to describe the virtual likenesses of people in a MMORPG-like world known as the 'Metaverse.'"
I've never seen or heard of Gravatars'
Marco