PHP Classes

File: readme.md

Recommend this page to a friend!
  Classes of Muhammad Umer Farooq   PHP Identicon   readme.md   Download  
File: readme.md
Role: Documentation
Content type: text/markdown
Description: Read me
Class: PHP Identicon
Generate an identicon image for a text string
Author: By
Last change:
Date: 5 years ago
Size: 827 bytes
 

Contents

Class file image Download

PHP Identicon

Identicon is a library which generate an identicon image based on a string.

Requirement

  • PHP
  • Composer

install

run this command


## usage

<?php

use Lablnet\Identicon; require '../vendor/autoload.php'; $Identicon = new Identicon; //$Identicon->getInstance()->setBlock(2); //change block $imageDataUri = $Identicon->getImgDataBase64('php'); echo "<img src=".$imageDataUri." />";



## Change Size , color and background

<?php

use Lablnet\Identicon; require '../vendor/autoload.php'; $Identicon = new Identicon; //$Identicon->getInstance()->setBlock(2); //change block string | size | foreground | background $imageDataUri = $Identicon->getImgDataBase64('php',1000,'#fff','#dad'); echo "<img src=".$imageDataUri." />";