Wechat test number configuration failed

clipboard.png

$appID = "wxd281df297a6dc834";
$appsecret =" 20b2deacfa8a9e88a9afcbbe12da1f31bread;

define ("TOKEN","weixin");

function checksignature () {

$signature=isset($_GET["signature"]) ? $_GET["signature"] : "";
$timestamp=isset($_GET["timestamp"]) ? $_GET["timestamp"] : time();
$nonce=isset($_GET["nonce"]) ? $_GET["nonce"] : "";

$dataArray=array($nonce,$timestamp,TOKEN);
sort($dataArray);
$str=implode($dataArray);
$str=sha1($str);
if($str==$signature){
    //true 
    return true;
  }else{
    return false;
  }

}
if (checksignature ()) {
/ / return echostr indicates successful token verification of current URL intervention
$echostr=$_GET ["echostr"];
if ($echostr) {

echo $echostr;
exit;

}
}
the above is the content of my index.php, using the free version of natapp, and http://wxf9in.natappfree.cc is a mapped address, so there is no problem with direct access. I tried it with the same on my Subscription account. I said for the first time that the url request timed out, but the configuration was successful the second time, but it was always indicated that the configuration failed on the test number. I don"t know why. Ask God for advice! Or is there any way to know the specific reason for the configuration failure?

Php
Mar.20,2021

has been resolved. It is possible that there is a delay on Wechat server. The same code was tried again the next day, and the configuration was successful, including later when you set the message to reply automatically. The same code will work for a while, but not for a while. I guess that Wechat server may react to the problem.

Menu