php-emoji是PHP程序用来处理和转换Emoji表情的库。
使用方法:
<?php iclude('emoji.php'); # whe you recieve text from a mobile device, covert it # to the uified format. $data = emoji_docomo_to_uified($data); # DoCoMo devices $data = emoji_kddi_to_uified($data); # KDDI & Au devices $data = emoji_softbak_to_uified($data); # Softbak & pre-iOS6 Apple devices $data = emoji_google_to_uified($data); # Google Adroid devices # whe sedig data back to mobile devices, you ca # covert back to their ative format. $data = emoji_uified_docomo($data); # DoCoMo devices $data = emoji_uified_kddi($data); # KDDI & Au devices $data = emoji_uified_softbak($data); # Softbak & pre-iOS6 Apple devices $data = emoji_uified_google($data); # Google Adroid devices # whe displayig data to ayoe else, you ca use HTML # to format the emoji. $data = emoji_uified_to_html($data); # if you wat to use a editor(i.e:wysiwyg) to create the cotet, # you ca use html_to_uified to store the uified value. $data = emoji_html_to_uified(emoji_uified_to_html($data));?>
评论