Materials needed :

php-emoji The download address of the class library :

Code example :( The code comes from the official website )

include('emoji.php'); # when you recieve text from a mobile device, convert it
# to the unified format.
// When you receive information from a mobile device , To translate this information into a unified format
// following 4 The first function is to convert the format of other devices to the unified format $data = emoji_docomo_to_unified($data); # DoCoMo devices
$data = emoji_kddi_to_unified($data); # KDDI & Au devices
$data = emoji_softbank_to_unified($data); # Softbank & pre-iOS6 Apple devices
$data = emoji_google_to_unified($data); # Google Android devices # when sending data back to mobile devices, you can
# convert back to their native format.
// following 4 The first function is to change from a unified format to a format that other devices can use $data = emoji_unified_docomo($data); # DoCoMo devices
$data = emoji_unified_kddi($data); # KDDI & Au devices
$data = emoji_unified_softbank($data); # Softbank & pre-iOS6 Apple devices
$data = emoji_unified_google($data); # Google Android devices # when displaying data to anyone else, you can use HTML
# to format the emoji.
// From unified format to html Format $data = emoji_unified_to_html($data); # if you want to use an editor(i.e:wysiwyg) to create the content,
# you can use html_to_unified to store the unified value. $data = emoji_html_to_unified(emoji_unified_to_html($data));

Realize web page display emoji The steps of expression :

One 、 download php-emoji

Two 、 stay html Import... Into the file emoji.css file

3、 ... and 、 Import... In the script emoji.php file

Complete code :

 <!doctype html>
<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
<!-- Import emoji.css file , Remember to import -->
<link rel="stylesheet" type="text/css" href="./php_emoji/emoji.css">
<div id="chatContent">
// Import php_emoji class
//$data yes emoji Facial expression data
$data = emoji_unified_to_html($data);
// At this point, we can echo Out emoji expression
echo $data;

remarks : Be sure to import emoji.css file

Use php-emoji Class to let the web page display emoji More articles about facial expressions

  1. [ correct ] Firemonkey Android Show Emoji ( Emoticons )

    problem : stay Android Under the platform , Show  Emoji written words , Can't display color ( It's all black ), for example Edit Control , Even if Edit.ControlType = Platform Set as platform native control , It's still useless ( really ...

  2. php Caching tool class Realize web caching

    php Caching tool class Realize web caching php When the program resists large traffic, dynamic websites are often hard to resist , So we need to introduce a caching mechanism , In general, there are two types of caching One . File cache Two . Data query result cache , Use memory for caching Ben ...

  3. IOS Public class -MyMBProgressUtil Progress Show

    IOS Public class -MyMBProgressUtil Progress Show This public class is used to display prompt boxes , Yes MBProgress Further encapsulation . Look at the code below Interface : @interface MyMBProgre ...

  4. Read a text file , And output to the web page display adopt The general handler implements Read a text file , And output to the web page display adopt The general handler implements With this can do template home page output , You can also customize and extend it yourself // Get the read text to string in string resultTe ...

  5. Metro Control in WebView Access to external web pages shows a blank

    Metro Control in WebView Access to external web pages shows a blank Solution : ​ Download and install Initex.Software.Proxifier.v3.21.Standard.Edition.Incl.Keyma ...

  6. python Learning notes --Django Entry one Page display time

    My notes are learning I did it in class , The article above is really very detailed , Thank you very much for your knowledge . It has been configured in the last essay Django Environmental Science , Now keep following ht ...

  7. Inno Setup Web display plug-in webctrl (V2.1 edition )

    original text Inno Setup Web display plug-in webctrl Be able to display all IE Something that can be shown in .   Quotes ; ...

  8. wamp After installation, open the default web page display dir, Red dot on the icon

    First, the web page displays dir, Because the services didn't start , The red dot on the icon is one reason , Solved the red dot of the icon , Can solve the problem of just showing dir The problem of . First test whether it is a port occupancy problem , Pictured : If it is , Then keep going down . Left click on the icon ( Remember it's the left button ), however ...

  9. Inno Setup Web display plug-in webctrl

    original text :Inno Setup Web display plug-in webctrl ; -- Example.iss -- ; restools ; ; The plugin name :webc ...

Random recommendation

  1. CSharpGL(32) Transformation between matrix and quaternion and angle rotation axis

    CSharpGL(32) Transformation between matrix and quaternion and angle rotation axis Rotation in a three-dimensional world (rotate), You can use a 3x3 Matrix description of : It can be used ( Rotation Angle float+ Rotation axis vec3) describe . The mathematician Euler proved that these two forms can be ...

  2. Python The way ,Day3 - Python Basics 3

    One . File operations Document operation process Open file , Get the file handle and assign it to a variable Operate on the file through the handle Close file The existing documents are as follows 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 ...

  3. gitlab install

    GitLab Installation method of GitLab Two ways to install : Compilation and installation advantage : Can be customized . The database can either select MySQL, You can also choose PostgreSQL; The server can either select Apache, You can also choose Nginx. shortcoming ...

  4. Java Basics A static block 、 Non static block 、 The order in which the constructors are executed

    Java There are often static blocks in , This is used for initialization before class generation , No matter what java also C++ In language static, It's all the first to initialize . The structure is as follows : static {  Static statement code block  } {  Non static statement code block  }  ...

  5. 20150603_Andriod Multiple form data callbacks

    package com.example.test1; import;import android.os.Bundle; ...

  6. my android Learning experience 18

    Today I mainly learned a few android Control and use two adapters ListView DatePicker and TimePicker GridView Adapter :SimpleAdapter and ArrayAdapter It's all regular ...

  7. First time to know PCA Data dimension reduction

    PCA The things to do are noise reduction and redundancy elimination , Its essence is to diagonalize the covariance matrix . One . Preliminary knowledge 1.1 Analysis of covariance For a general distribution , Directly into E(X) And so on , But really give you a distribution of specific values , To compute the covariance matrix , According to this ...

  8. Deep understanding of array names and pointers (C++)

    Pointer is C/C++ Characteristics of language , There are too many similarities between array names and pointers , Even a lot of times , Array names can be used as pointers . So , A lot of programmers get confused . Magic array name, please see the program ( This program is in WIN32 Compiling under the platform ): #includ ...

  9. Archlinux Install in LyX

    LyX yes Latex Of GUI Interface program . The effect is similar Office Word and wps. It can be generated directly PDF file . I'm using LyX + TexLive + XeTeX Combine . In the near future Arch ...

  10. Do not use inside functions strtok()

    Today, while debugging the program , A strange thing happened , At first, I was worried about the memory overflow of the code , It took half an hour to find out why . At dinner time , It suddenly occurred to me that it might be  strtok() Caused by the , Find the function called , Sure enough, we found that we used   ...