Skip to content

Instantly share code, notes, and snippets.

@aamnah
Last active August 29, 2015 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aamnah/3ff8fab4684bb1978d0f to your computer and use it in GitHub Desktop.
Save aamnah/3ff8fab4684bb1978d0f to your computer and use it in GitHub Desktop.
Gravatar
<?php
$email = "aamnah@aamnah.com";
$email_neat = strtolower(trim($email));
$email_hash = md5($email_neat);
$file_type = 'jpg';
$size = 80;
$gravatar = 'http://www.gravatar.com/avatar/'. $email_hash . '.' . $file_type. '?s=' . $size .'';
$gravatar_image = '<img src="'. $gravatar . '" />';
echo $email_hash . '<br/>';
echo $gravatar . '<br/>';
echo $gravatar_image . '<br/>';
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment