1. Go to this page and download the library: Download ph-7/ph2gravatar library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
ph-7 / ph2gravatar example snippets
use PH7\PH2Gravatar\Image;
use PH7\PH2Gravatar\Image as Gravatar;
// Show the gravatar image link
echo Gravatar::get('[email protected]', [
'size' => 80,
'rating' => 'pg',
'display' => 'retro'
]);
// https://www.gravatar.com/avatar/9c47a7bb2aec6e61df372a8f8446ed9d?s=80&r=pg&d=retro