全球主机交流论坛
标题:
自己写了个php处理监控宝URL回调的页面,为什么不行?
[打印本页]
作者:
SalesHosting
时间:
2012-2-9 11:51
标题:
自己写了个php处理监控宝URL回调的页面,为什么不行?
本帖最后由 SalesHosting 于 2012-2-9 11:57 编辑
我的帖子已经被李院长秒杀了。。。
为什么一执行就500错误?我php没怎么学过,见笑了。
<?php
$msg_id = $_GET['msg_id'];
$task_id = $_GET['task_id'];
$fault_time = $_GET['fault_time'];
$token = $_GET['token'];
$url_token = '';
$task_status = $_GET['task_status'];
$normal_time = date('r', $fault_time);
//如果校验成功,则说明此消息为监控宝系统发出,否则为非法请求,不予处理
if (md5($msg_id . $task_id . $fault_time . $url_token) == $token) {
if ($task_status == 1) {
echo "Time:";
echo $normal_time;
echo "<br><h1>The server is <b>DOWN</b>!</h1>";
}
else if ($task_status == 0) {
echo "Time:";
echo $normal_time;
echo "<h1>The server is <b>FINE</b>!"
}
}
?>
复制代码
作者:
hitsword
时间:
2012-2-9 11:53
啥玩意?
作者:
李院长
时间:
2012-2-9 11:54
22行少了;结尾
作者:
SalesHosting
时间:
2012-2-9 11:54
hitsword 发表于 2012-2-9 11:53
啥玩意?
监控宝,没用过?jiankongbao.com
作者:
用户名
时间:
2012-2-9 11:54
自己找出错误的地方~
作者:
SalesHosting
时间:
2012-2-9 11:55
李院长 发表于 2012-2-9 11:54
22行少了;结尾
...李院长。。。
好吧,我没看见。。。
欢迎光临 全球主机交流论坛 (https://fd.vvwvv.eu.org/)
Powered by Discuz! X3.4