PHP Classes
elePHPant
Icontem

PHP Identicon: Generate an identicon image for a text string

Recommend this page to a friend!
  Info   View files Example   View files View files (8)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2018-11-04 (1 month ago) RSS 2.0 feedNot enough user ratingsTotal: 86 All time: 9,173 This week: 133Up
Version License PHP version Categories
php-identicon 1.0.0MIT/X Consortium ...7HTML, PHP 5, Graphics
Description Author

This class can generate an identicon image for a text string.

It can take a given text string as parameters and generates an image that represents that text using identicon patterns.

Details like the colors, number of blocks and image size are configurable parameters.

The class generates an data URL that can be used in HTML image tags to embed the image directly in the HTML code of the pages.

Name: Malik umer Farooq is available for providing paid consulting. Contact Malik umer Farooq .
Classes: 37 packages by
Country: Pakistan Pakistan
Age: 17
All time rank: 136418 in Pakistan Pakistan
Week rank: 11 Up1 in Pakistan Pakistan Up
Innovation award
Innovation award
Nominee: 2x

Details

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." />";


  Files folder image Files  
File Role Description
Files folder imageexample (1 file)
Files folder imagesrc (3 files)
Accessible without login Plain text file .travis.yml Data Auxiliary data
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file readme.md Doc. Read me

  Files folder image Files  /  example  
File Role Description
  Accessible without login Plain text file index.php Example Example script

  Files folder image Files  /  src  
File Role Description
  Plain text file Base.php Class Class source
  Plain text file Gd.php Class Class source
  Plain text file Identicon.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:86
This week:0
All time:9,173
This week:133Up
User Comments (3)
useful package
23 days ago (Serban Udescu)
80%StarStarStarStarStar
useful package
23 days ago (Serban Udescu)
80%StarStarStarStarStar
useful package
23 days ago (Serban Udescu)
80%StarStarStarStarStar