Toggle navigation
Home
Latest pastes
FAQ
Random
BitBin is shutting down!
Register
Login
Using Gravatars In Your Script
SUBMITTED BY:
Guest
DATE:
June 12, 2013, 1:25 a.m.
FORMAT:
PHP
SIZE:
467 Bytes
Raw
Download
Tweet
HITS:
1233
Go to comments
Report
<?php
// source: http://www.apphp.com/index.php?snippet=php-using-gravatars-in-your-script
function
show_my_gravatar
(
$email
,
$size
,
$default
,
$rating
)
{
$params
=
'?gravatar_id='
.
md5
(
$email
)
.
'&default='
.
$default
.
'&size='
.
$size
.
'&rating='
.
$rating
;
$output
=
'<img src="http://www.gravatar.com/avatar.php'
.
$params
.
'" width="'
.
$size
.
'px" height="'
.
$size
.
'px" />'
;
echo
$output
;
}
?>
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus