PHP Classes

PHP Get Gravatar URL: Get the HTML to show an user image from Gravatar

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 50 All time: 10,720 This week: 488Up
Version License PHP version Categories
php-gravatar-class 1.0.0MIT/X Consortium ...5HTML, PHP 5, Graphics, Web services
Description 

Author

This class can get the HTML to show an user image from Gravatar.

It takes the email address for an given user and calls the Gravatar API to get the URL of the user image.

The class generates HTML to show an image using its URL returned from Gravatar.

Picture of Muhammad Umer Farooq
Name: Muhammad Umer Farooq <contact>
Classes: 52 packages by
Country: Pakistan Pakistan
Innovation award
Innovation award
Nominee: 6x

Example

<?php

require "Classes/Gravatar.php";

$g = new Gravatar("lablnet01@gmail.com");
echo
$g->toHtml();


echo
"<br>";

//Change the size
$g->setSize(512);
echo
$g->toHtml();


  Files folder image Files (4)  
File Role Description
Files folder imageClasses (1 file)
Accessible without login Plain text file index.php Example Example script
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file readme.md Example Example script

  Files folder image Files (4)  /  Classes  
File Role Description
  Plain text file Gravatar.php Class Class source

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:50
This week:0
All time:10,720
This week:488Up