php-emoji使用详解
地址: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
<?php
include("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));
声明:该文观点仅代表作者本人,入门客AI创业平台信息发布平台仅提供信息存储空间服务,如有疑问请联系rumenke@qq.com。
- 上一篇:没有了
- 下一篇: 简单、 灵活、强大的PHP采集工具,让采集更简单一点。
copyright © 2008-2019 入门客AI创业平台 版权所有 备案号:湘ICP备2023012770号