PHP Classes

File: texte.php

Recommend this page to a friend!
  Classes of Maicon gonçalez  >  PHP Emoji  >  texte.php  >  Download  
File: texte.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Emoji
Render Emoji Unicode text characters with images
Author: By
Last change: Update PHPClasses.org
Date: 6 years ago
Size: 789 bytes
 

Contents

Class file image Download
<?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>';

For more information send a message to info at phpclasses dot org.