我可以通过php curl中的get方法发送一个包含卷曲括号的参数
我正在研究应用程序API。我正在尝试创建一个使用PHP提取数据的机器人。简而言之,我需要在GET方法下发送一个参数,此参数包含一个JSON数据,因此我用卷曲括号介绍它,但是当我这样做时,PHP curl无法正常工作,我向URL提出了请求我不想要,你能帮我吗?
I'm working on application APIs. I'm trying to create a bot to pull data with php. In short, I need to send a parameter under the GET method, this parameter contains a json data, so I cover it with curly brackets, but when I do this, php curl does not work properly and I make a request to a url that I do not want, can you help me please?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用
JSON_ENCODE()
创建JSON和urlencode()
将其正确编码以在URL中使用。Use
json_encode()
to create the JSON, andurlencode()
to encode it properly for use in a URL.