php-emoji使用详解
来源:互联网 发布:淘宝发布完宝贝就下架 编辑:程序博客网 时间:2024/05/20 23:57
地址:https://github.com/iamcal/php-emoji
php-emoji - Process Emoji in PHP
This is a PHP library for dealing with Emoji, allowing you to convert between various native formats and displaying them using HTML.
You can read more about it and see a demo here: http://www.iamcal.com/emoji-in-web-apps/
The data this library is based on comes from another GitHub project: https://github.com/iamcal/emoji-data
USAGE
<?phpinclude('emoji.php');# when you recieve text from a mobile device, convert it# 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.$data = emoji_unified_to_docomo($data); # DoCoMo devices$data = emoji_unified_to_kddi($data); # KDDI & Au devices$data = emoji_unified_to_softbank($data); # Softbank & pre-iOS6 Apple devices$data = emoji_unified_to_google($data); # Google Android devices# when displaying data to anyone else, you can use HTML# to format the emoji.$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));
When using the HTML format, you'll also need to include the emoji.css
file, which points to the emoji.png
image.
IMPORTANT NOTE: This library currently only deals with UTF-8. If your source data is JIS or Shift-JIS, you're out of luck for the moment.
Credits
By Cal Henderson cal@iamcal.com
Images and Emoji data come from emoji-data.
This work is dual-licensed under the GPL v3 and the MIT license.
- php-emoji使用详解
- Emoji for PHP
- php emoji表情处理
- php剔除emoji表情符号
- php处理emoji
- 使用EMOJI表情
- 使用EMOJI表情
- 使用EMOJI表情
- 使用EMOJI表情
- 使用EMOJI表情
- android Emoji 研究使用
- php+mysql 解决emoji问题
- php+mysql存储emoji表情
- php string去掉emoji表情
- php+mysql保存emoji表情
- php mysql emoji 的存储
- ios中使用emoji表情
- 安卓使用emoji表情
- POJ-3273-Monthly Expense
- Spring MVC之@RequestBody, @ResponseBody 详解
- gulp插件gulp-file-include的模板复用功能
- mysql 查看数据库中所有表的记录数
- The user types in Qt on D-Bus
- php-emoji使用详解
- Linux下MongoDB安装和配置详解(三)
- 程序员必须掌握的600个英语单词
- 经典计算机视觉论文笔记——DeepFace\DeepID\DeepID2\DeepID3\FaceNet\VGGFace汇总
- JVM运行时数据区域
- java信号量Semaphore介绍
- linux之sed用法
- H5创建一个简单的自动幻灯片
- Mongodb3.2.9开启权限认证问题