PHP code example of baraja-core / gravatar

1. Go to this page and download the library: Download baraja-core/gravatar 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/ */

    

baraja-core / gravatar example snippets


$gravatar = new Gravatar;

// Get icon URL - default icon size
$gravatar->getIcon('[email protected]');

// small icon size
$gravatar->getIcon('[email protected]', 32);

// big icon size
$gravatar->getIcon('[email protected]', 255);

// Get user full info as GravatarResponse
$gravatar->getUserInfo('[email protected]');