Closed Karensen closed 7 years ago
有可能是因为你在发送的时候,参数没有进行 urlencode?
哪个的参数啊? cq码的?
调用 https://richardchien.github.io/coolq-http-api/#/API 这里的每个接口的时候,都要对 GET 或 POST 的参数/表单做 urlencode,或者以 JSON 形式发送
大佬的意思是要以json格式发送到监听的端口么??
我是比较建议用 JSON 的,因为不容易出现莫名其妙的问题,另外不是很了解 PHP,不过估计你发的这样直接拼接字符串应该是不会自动 urlencode 的
你看下这个函数 http://php.net/manual/en/function.urlencode.php 在拼接之前用这个函数处理一下字符串看看
php也有jsonencode函数的,我开始一直都是用大佬例子里发的那个链接访问发信息的方法
希望大佬能够加入获取群成员信息或者好友信息的功能啊
获取群成员和好友信息我也想写的,不过那个酷 Q 里面没有官方实现,我现在的代码基础上实现起来有点麻烦,如果以后有空的话,会考虑做一下
php也有jsonencode函数的,我开始一直都是用大佬例子里发的那个链接访问发信息的方法
你可以先试试 '&message=' . urlencode($message);
这样,一般主要就是要 urlencode 一下 message
果然可以了,感谢大佬指点ORZ
不客气(另外,我也不是大佬 ==
利用大佬的接口写了个php脚本,但是发现换行好像没办法处理啊,请问大佬这是什么原因呢?