当前位置:网站首页>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']);
}
}边栏推荐
- Analyse complète annuelle du marché chinois de l'audio en 2022
- 求一个能判断表中数据,只填充不覆盖的sql
- A bit of knowledge - online resources on Chinese Learning
- The second round of free public classes of the red team is coming ~ 8:00 tomorrow night!
- Has anyone ever used CDC to synchronize to MySQL with a deadlock?
- MySQL gets the current date of the year
- Go language learning tutorial (14)
- Sword finger offer 47 Maximum gift value (DP)
- How to traverse collections Ordereddict, taking it and forgetting items
- [CSP-J2020] 优秀的拆分
猜你喜欢

How to traverse collections Ordereddict, taking it and forgetting items

Sword finger offer 49 Ugly number (three finger needling technique)

UI自動化測試框架搭建 —— 編寫一個APP自動化
![[CSP-J2020] 优秀的拆分](/img/05/90f9cf71791b3cdc37073eaf5db989.png)
[CSP-J2020] 优秀的拆分

【Matlab BP回归预测】GA优化BP回归预测(含优化前的对比)【含源码 1901期】

100+数据科学面试问题和答案总结 - 机器学习和深度学习

How do I get the STW (pause) time of a GC (garbage collector)?
![[matlab traffic light identification] traffic light identification [including GUI source code 1908]](/img/0e/3103c4c5dd664196c85db9b30bcaf5.png)
[matlab traffic light identification] traffic light identification [including GUI source code 1908]

Go language -select statement

A doctor's 22 years in Huawei (full of dry goods)
随机推荐
互联网的发展促进了无界零售、数字零售、即时零售等一系列新模式的出现
Find an SQL that can judge the data in the table and only fill in the SQL that is not overwritten
浅析搭建视频监控汇聚平台的必要性及场景应用
Audio and video technology development weekly
Principle of event delegation
Matlab exercises -- exercises related to symbolic operation
CUPTI error: CUPTI could not be loaded or symbol could not be found.
Performance optimization and implementation of video codec
测试/开发程序员真的是青春饭吗?世界是公平的,咱们都凭实力说话......
代码理解:IMPROVING CONVOLUTIONAL MODELS FOR HANDWRITTEN TEXT RECOGNITION
Why are cloud vendors targeting this KPI?
Array method
27 years, Microsoft IE is over!
Detailed reading of the thesis: implementing volume models for handowriting text recognition
Precautions for using C language global variables (global variables in C and H files, static global variables)
Necessary skills for test and development: actual combat of security test vulnerability shooting range
Principle and implementation of SSD for target detection
AspNetCoreRateLimit 速率限制 接口访问限制 限流控制
华为9年经验的软件测试总监工作感悟—写给还在迷茫的朋友
Is it true that qiniu business school gives away securities accounts? Is it safe to open an account