Services_Libravatar
[ class tree: Services_Libravatar ] [ index: Services_Libravatar ] [ all elements ]

Source for file usage.php

Documentation is available at usage.php

  1. <?php
  2. /**
  3.  * How to use Services_Libravatar
  4.  */
  5. require_once 'Services/Libravatar.php';
  6.  
  7. $sla = new Services_Libravatar();
  8. $sla->setSize(48)
  9.     ->setDefault('monsterid');
  10.  
  11. $blogCommentUsers = array(
  12.     'foo@example.org',
  13.     'someone@example.net'
  14. );
  15.  
  16. foreach ($blogCommentUsers as $email{
  17.     $avatarUrl $sla->getUrl($email);
  18.     echo $email ': <img src="' htmlspecialchars($avatarUrl'" alt="avatar"/>'
  19.         . '<br/>' "\n";
  20. }
  21. ?>

Documentation generated on Mon, 11 Mar 2019 15:54:24 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.