Im有一个密码保护的提要。下面是用于访问饲料使用CURL输出和php XML函数来处理大数据输入
$url = 'http://thefeedwebsite.com/feed.php';
$data = array("username" => ‘user’, "password" => ‘password’, "location" => "HK")
$ch = curl_init($url);
);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 0);
$output = curl_exec($ch);
curl_close($ch);
问题的代码,由于大尺寸的输出大约100结果之后它保持在超时。我已经在我的php.ini中设置了一些线程的时间限制,但仍然是相同的问题。我认为它是因为CURL加载完整的内存。
是否有可能直接将$output
加载到XMLReader()
在PHP中,所以我可以通过阅读器更快地处理Feed?
对不起,这个问题是完全noob。刚开始用xml学习php