<?php define("TOKEN", " Define yourself "); $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
JavaScript study ( Scope )R Language group summation , Group average , Group count antd table sort 2021 Front end high frequency interview questions ( You have to watch it !!!)Android end Firefox Testing credit card and address auto fill function Sql What is the order of execution of ?vue+element-ui Realize the input limit of price 2021 Front end interview questions and written questions ——Vuejavascript Adding and deleting form information FastAPI to write get,post Interface , adopt json Interface for parameter transfer