Gravatar image and PHP

Hi friends ,

When I noticed gravatar webpage , They told how to get gravatar image from our own

PHP code . So I tried and see today . I will  share my code with U 🙂

 $email = $_REQUEST['email'];
 $grav_url = "" . md5( strtolower( trim( $email ) ) ) . "&s=20";
 <div style = 'width: 500px; background :lightblue;padding :10px; margin: 0 auto; '>
 <form action = 'gravatar.php' method = 'POST'>
 Enter your Email : <input type = 'text' name = 'email'><br />
 <input type = 'submit' value = 'click'><br /><br />
 <img src="<?php echo $grav_url; ?>" alt="" />

Output :

Give ur mail id and get ur gravatar image  🙂

. It was working 🙂

This is one line code to get gravatar image using PHP

$grav_url = "" . md5( strtolower( trim( $email ) ) ) . "&s=20";

Note: U should have gravatar iamge 🙂 🙂


About sathia

Web developer at cloudmint
This entry was posted in ImageMagick and Python. Bookmark the permalink.

2 Responses to Gravatar image and PHP

  1. pras1130 says:

    usefull code da.. thanks….

  2. V.Ramachandran says:

    Nice post.
    Thanks for sharing.:-)

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s