9-STM32物联网开发WIFI(ESP8266)+GPRS(Air202)系统方案微信小程序篇(微信配网配置_开发者基本配置_2)

https://www.cnblogs.com/yangfengwu/p/11062422.html

这一节看怎么用PHP实现上一节的功能

关掉上一节的

学了这么久,忘了告诉大家怎么关闭程序了.....

可以这样,建一个后缀名为.bat的文件   文件名字随意

 里面写上

taskkill /IM python.exe /F

 然后双击运行

会看到这边断开了

 

其它方式自行百度

 咱把程序放到这里面

 

里面建一个token.php 的文件 

 

复制代码

<?php  

//http://localhost:63343/lesson2/lesson2.php?timestamp=1&nonce=2&signature=3
//1. 将timestamp , nonce , token 按照字典排序
$timestamp = $_GET['timestamp'];
$nonce = $_GET['nonce'];
$token = "mnifdv";
$signature = $_GET['signature'];
$array = array($timestamp, $nonce, $token);
sort($array);

//2.将排序后的三个参数拼接后用sha1加密
$tmpstr = implode('', $array);
$tmpstr = sha1($tmpstr);

//3. 将加密后的字符串与 signature 进行对比, 判断该请求是否来自微信
if ($tmpstr == $signature) {
    header('content-type:text');
    echo $_GET['echostr'];
    exit;
}
else {
    echo "";
}

复制代码

 

 

 

 

https://item.taobao.com/item.htm?spm=a1z38n.10677092.0.0.3e3b1deb80xzYz&id=569295486025

网上还有其它人用TCP实现解析的...其实都一样,如果学习了前面的教程应该懂得 ....

https://www.cnblogs.com/yangfengwu/p/11066472.html

猜你喜欢

转载自blog.csdn.net/qq_14941407/article/details/93680710