soap - PHP : What is fastest SOAP, file_get_contents 或 Curl?

标签 soap curl file-get-contents

我有网站 A,它在 header 中的每个页面加载上向网站 B 发送请求。 B 服务器正在 mysql 中进行一些内部搜索,需要返回一些数据到服务器 A,服务器 A 将根据该响应显示一些内容。

在这两个服务器之间进行通信的最快方式是什么?

最佳答案

最快、最简单的方法是 cURL,而且 cURL 返回的数据很容易解析。 get_file_contents 的使用纯粹专用于读取文件,而 cURL 完全专用于两个服务器之间的数据通信。

关于soap - PHP : What is fastest SOAP, file_get_contents 或 Curl?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13413960/

相关文章:

PHP curl : Manually setting the content-length header

php - file_get_contents 在生产服务器上不工作,在本地很好

php - "Object reference not set to an instance of an object"从 PHP 连接到 SOAP 服务器时出错

php - 有没有人成功使用 PHP 从亚马逊卖家中心下载订单?

c# - 处理 WCF 服务中的异常?

c# - 将通用对象序列化为 SOAP 格式流的扩展方法

http - 如何 curl 或 wget 网页?

php - 无法使用 cURL 连接到 HTTPS 站点。而是返回 0 长度的内容。我能做些什么?

php - 来自 url 的 file_get_contents 只能在登录网站后访问

PHP file_get_contents/CURL 不返回整页