Created
February 7, 2015 18:01
-
-
Save saltun/d37f63196466fe03b3dd to your computer and use it in GitHub Desktop.
gravatar Function PHP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Gravatar Function PHP | |
* 07.02.2015 - Savaş Can ALTUN | |
* <[email protected]> | |
*/ | |
public function gravatar($mail,$size=50,$noavatar=NULL){ | |
$pass=md5(strtolower(trim($mail))); | |
return "http://www.gravatar.com/avatar/$pass?d=$noavatar&s=$size"; | |
} | |
/* | |
@var string - E-mail | |
@var int - Size | |
@var string - Default Avatar image | |
*/ | |
echo gravatar('[email protected]',125,'noavatarurl'); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment