PHP Classes

PHP Emoji: Render Emoji Unicode text characters with images

Recommend this page to a friend!
  Info   Example   Screenshots   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 250 All time: 7,925 This week: 73Up
Version License PHP version Categories
php-emoji 0.1GNU General Publi...5.3HTML, PHP 5, Graphics, Text processing
Description 

Author

This package can render Emoji Unicode text characters with images.

It can take given text with Emoji characters encoded using Unicode and replaces them with HTML image tags to display the respective icon images.

The supported Emoji characters are configured in files defined in the JSON format. More Emoji character sets can be supported adding more Emoji configuration files.

Innovation Award
PHP Programming Innovation award nominee
November 2015
Number 10


Prize: One downloadable copy of Komodo IDE
Over the years Emojis became more and more popular to let the users express emotions using graphical icons in text messages. Therefore Unicode has been improved to include Emoji icons as text characters.

This class can render text with Emoji text characters using icon images, so you do not need a special font for rendering the Unicode Emoji text characters.

Manuel Lemos
Picture of Maicon gonçalez
  Performance   Level  
Innovation award
Innovation award
Nominee: 3x

 

Recommendations

Convert Emoji Charaters
I want to replace Emoji Characters

Example

<?php
header
('Content-Type: text/html; charset=utf-8');

require_once(
"Emoji/Emoji.php");
use
Emoji\EmojiReplace\Emoji as EmojiClass;

$Emoji = new EmojiClass();

//Set Dir Assets (Ex: http://domain.com/Emoji/AssetsEmoji/)
$Emoji->setDirAssets("./Emoji/AssetsEmoji/");

//Set Pack Icons
// Options -> IconsB&W, IconsIphone, IconsAndroid, IconsTwitter, IconsWind

/* Download Packs https://github.com/Dellacurtais/PHP-Emoji/tree/master/Emoji/AssetsEmoji/Icons
* Extract On Dir Assets (ex: ./Emoji/AssetsEmoji/)
*/
$Emoji->setDirPack("IconsIphone");

// Generate Emojis (important)
$Emoji->generateEmoji();

//$Emoji->getCss()

//Exemplo
echo '<link rel="stylesheet" href="'.$Emoji->getCss().'" />';
echo
'<p style="font-size:40px"> Olá ';
echo
$Emoji->TextReplace('?');
echo
'</p>';


Details

PHP-Emoji

PHP Emoji, Classe para substituir emojis por ícones.

Extrac Pack Icons on Emoji/AssetsEmoji/Icons/

Full Docs - emojiphp.inclouds.com.br


Screenshots (1)  
  • View
  Files folder image Files (10)  
File Role Description
Files folder imageEmoji (2 files, 2 directories)
Accessible without login Plain text file README.md Data Auxiliary data
Accessible without login Plain text file texte.php Example Example script

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 90%
Total:250
This week:0
All time:7,925
This week:73Up