$email = "someone@somewhere.com";
$default = "http://www.somewhere.com/homestar.jpg";
$size = 40;
$grav_url = "http://www.gravatar.com/avatar.php?
gravatar_id=".md5( strtolower($email) ).
"&default=".urlencode($default).
"&size=".$size;
Code language: PHP (php)
The above code creates a $grav_url which contains the md5 hash of email address and the size details. This gravatar url can then be used in an <img src=””> tag and the image will be loaded. <img src="<? echo $grav_url ?>"/>
Code language: HTML, XML (xml)
import java.util.*; import java.io.*; import java.security.*; public class MD5Util { public static String hex(byte[] array) { StringBuffer sb = new StringBuffer(); for (int i = 0; iCode language: Java (java)
Java URL Encoder/Decoder Example - In this tutorial we will see how to URL encode/decode…
Show Multiple Examples in OpenAPI - OpenAPI (aka Swagger) Specifications has become a defecto standard…
Local WordPress using Docker - Running a local WordPress development environment is crucial for testing…
1. JWT Token Overview JSON Web Token (JWT) is an open standard defines a compact…
GraphQL Subscription provides a great way of building real-time API. In this tutorial we will…
1. Overview Spring Boot Webflux DynamoDB Integration tests - In this tutorial we will see…
View Comments
wawww its awsome dude i like it too much so i m a new blogger so kindly if u have any good tips for me then plzz tell me