当前位置:网站首页>PHP code wechat, official account and enterprise wechat send emoticons [u+1f449]
PHP code wechat, official account and enterprise wechat send emoticons [u+1f449]
2022-06-28 04:48:00 【fuchto】
Add calling method
function utf8_bytes($cp) {
if ($cp > 0x10000){
return chr(0xF0 | (($cp & 0x1C0000) >> 18)).
chr(0x80 | (($cp & 0x3F000) >> 12)).
chr(0x80 | (($cp & 0xFC0) >> 6)).
chr(0x80 | ($cp & 0x3F));
}else if ($cp > 0x800){
return chr(0xE0 | (($cp & 0xF000) >> 12)).
chr(0x80 | (($cp & 0xFC0) >> 6)).
chr(0x80 | ($cp & 0x3F));
}else if ($cp > 0x80){
return chr(0xC0 | (($cp & 0x7C0) >> 6)).
chr(0x80 | ($cp & 0x3F));
}else{
return chr($cp);
}
}
Convert expression
$content['conten'] Content sent for
$content['content'] = htmlspecialchars_decode($content['content']);
preg_match_all('/\[U\+(\\w{4,})\]/i', $content['content'], $matchArray);
if(!empty($matchArray[1])) {
foreach ($matchArray[1] as $emojiUSB) {
$content['content'] = str_ireplace("[U+{$emojiUSB}]", utf8_bytes(hexdec($emojiUSB)), $content['content']);
}
}
边栏推荐
- Necessary skills for test and development: actual combat of security test vulnerability shooting range
- 政策利好,20多省市开启元宇宙发展规划
- mysql修改密码报错需要怎么做
- Flinkcdc collects Oracle, and the Oracle database is CDB's
- Flexible IP network test tool -- x-launch
- 【Matlab BP回归预测】GA优化BP回归预测(含优化前的对比)【含源码 1901期】
- Audio and video technology development weekly
- Short video platform development, click links and pictures to automatically jump to a new page
- The SQL of filincdc always reports this error when there are multiple tables. How can I solve it
- Matlab exercises -- exercises related to symbolic operation
猜你喜欢
UI自動化測試框架搭建 —— 編寫一個APP自動化
One article explains in detail | those things about growth
Huawei's 9-year experience as a software testing director
100+数据科学面试问题和答案总结 - 机器学习和深度学习
【Matlab红绿灯识别】红绿灯识别【含GUI源码 1908期】
云厂商为什么都在冲这个KPI?
Introduction to SQLSERVER database
UI automation test framework construction - write an app automation
[csp-j2020] excellent splitting
Matlab exercises -- routine operation of matrix
随机推荐
2022-06-27:给出一个长度为n的01串,现在请你找到两个区间, 使得这两个区间中,1的个数相等,0的个数也相等, 这两个区间可以相交,但是不可以完全重叠,即两个区间的左右端点不可以完全一样。
filinCdc 的sql,多表的时候总报这个错,请问下该怎么解决呀
Moonbeam integrates coin98, giving users more choices on the multi chain road
政策利好,20多省市开启元宇宙发展规划
CI & CD must be known!
Array method
易周金融 | Q1手机银行活跃用户规模6.5亿;理财子公司布局新兴领域
Precautions for using C language global variables (global variables in C and H files, static global variables)
Multithreading and high concurrency III: AQS underlying source code analysis and implementation classes
一文详解|增长那些事儿
OracleData安装问题
Win10 how to delete the large file hiberfil sys
Establishment of SSH Framework (Part 2)
Sword finger offer 53 - I. find the number I in the sorted array (improved bisection)
Detailed reading of the thesis: implementing volume models for handowriting text recognition
Go语言学习教程(十四)
Component splitting practice
native关键字的作用
Go language -select statement
Games104 operation 2-colorgrading