问题描述
我必须通过 GET 方法发出 HTTP 请求来发送 SMS.该链接包含 GET 变量形式的信息,例如
I have to send an SMS by making an HTTP request via GET method. The link contains information in the form of GET variables, e.g.
http://www.somelink.com/file.php?from=12345&to=67890&message=hello%20there
在我运行脚本后,它必须就像有人点击了链接并激活了 SMS 发送过程.
After I run the script it has to be as if someone clicked the link and activated the SMS sending process.
我找到了一些关于 get request 和 curl 的链接,还有什么不是,这太令人困惑了!
I have found some links about get request and curl and what not, it’s all so confusing!
推荐答案
最简单的方法可能是使用 cURL.请参阅 https://web.archive.org/web/20180819060003/http://codular.com/curl-with-php 一些例子.
The easiest way is probably to use cURL. See https://web.archive.org/web/20180819060003/http://codular.com/curl-with-php for some examples.
这篇关于如何在 PHP 中发出 HTTP 请求?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!