标签: php simplexml
我的服务器上有两个IP,我正试图通过两个IP分割我的xml请求。如何获取simplexml_load_file以在不同的IP上发出请求?
答案 0 :(得分:1)
您可以使用cURL并使用CURLOPT_INTERFACE option加载XML流。然后在结果上使用simplexml_load_string来解析它。
请参阅select outgoing ip for curl request了解如何操作。