加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > PHP教程 > 正文

php – 为什么使用curl而不是其他方法?

发布时间:2020-12-13 13:22:22 所属栏目:PHP教程 来源:网络整理
导读:我想知道为什么最好使用curl代替其他方法 php中的$ret = file($url). 这实际上用于访问sms网关的http api. 有人放弃了“我建议使用curl进行http连接”,但我不知道为什么. 我刚刚读到Paypal付款是必要的,所以这听起来很有趣. 我做了谷歌搜索“为什么使用libcu
我想知道为什么最好使用curl代替其他方法
php中的$ret = file($url).
这实际上用于访问sms网关的http api.

有人放弃了“我建议使用curl进行http连接”,但我不知道为什么.

我刚刚读到Paypal付款是必要的,所以这听起来很有趣.

我做了谷歌搜索“为什么使用libcurl”,但我还没有找到答案.

有人可以解释一下吗?

我认为 curl site上的FAQ最好说:

1.2 What is libcurl?

libcurl is a reliable and portable
library which provides you with an
easy interface to a range of common
Internet protocols.

You can use libcurl for free in your
application,be it open source,
commercial or closed-source.

libcurl is most probably the most
portable,most powerful and most often
used C-based multi-platform file
transfer library on this planet – be
it open source or commercial.

此外,curl有助于同时从多个源下载数据,效率高于file_get_contents()或file().

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读