|
- <?php
- /*
- * CopyRight : [Discuz!] (C)2001-2099 HaoTeam Inc.
- * Document : piaobo.php
- * Created on : 2015-10-8,13:32:20
- * Author : 51漂泊(51piaobo) www.51piaobo.com $
- * Description: This is NOT a freeware, use is subject to license terms.
- * 这即使是一个免费软件,使用时也请遵守许可证条款,得到当时人书面许可。
- * 未经书面许可,不得翻版,翻版必究;版权归属51漂泊;
- */
- header("Content-type: text/html; charset=GBK");
- /*
- * 错误代码:
- * -1 QQ号码/发送消息/key不存在
- * -2 KEY 不正确
- * -3 参数被修改
- * sendqq 必须是数字
- * 正常返回为大于0的数字
- */
- $param = array('sendqq' => '你要让机器人发送的QQ号', 'message' => '你要发生的QQ消息');
- $key = '你的KEY';
- ksort($param);
- $params ='';
- foreach ($param as $k => $v) {
- $params .= '&' . $k . '=' . rawurlencode($v);
- }
- $md5hash = md5(substr($params, 1) . $key);
- $url = 'http://bbs.mg-pen.com/plugin.php?id=piaobo_im:api&key='.$key.'&md5hash='.$md5hash . $params;
- $content = file($url);
- ?>
复制代码
|
|