<?php define("TOKEN", "自己定义"); $wechatObj = new wechatCallbackapiTest();
$wechatObj->valid(); class wechatCallbackapiTest{ public function valid(){
$echoStr = $_GET["echostr"]; if($this->checkSignature()){ echo $echoStr; exit;
} }private function checkSignature(){ $signature = $_GET["signature"];
$timestamp = $_GET["timestamp"]; $nonce = $_GET["nonce"]; $token = TOKEN;
$tmpArr = array($token, $timestamp, $nonce); sort($tmpArr); $tmpStr = implode(
$tmpArr ); $tmpStr = sha1( $tmpStr ); if( $tmpStr == $signature ){ return true;
}else{ return false; } } } ?>

技术
©2020 ioDraw All rights reserved
玩转Jetson Nano(八)人脸识别(二)Windows 10 21H1确认:经典版Edge被遗弃、不会更新python gui界面实例-Python GUI编程完整示例JDBC连接MySQL数据库Timezone时区问题FAQAndroid 12现在有了设备搜索API 可用于第三方启动程序Adobe Illustrator发布原生支持Apple Silicon的测试版软件初识Mongdb之数据查询篇(三)统计JIRA系统当前的bug情况Thread.setDaemon设置守护线程vue+element-ui 实现价格的输入限制