Answer the question
In order to leave comments, you need to log in
How to parse more than 200 xml files?
It is necessary to parse more than 30 xml files. Using the code below does not work, the error "failed to open stream: HTTP request failed!"
Here is the code:
for($i=16000000; $i <= 16000250; $i++) {
$xml = simplexml_load_file("http://site/?id=$i");
if($xml->error == "0") {
echo $xml->people. "<br>";
}
}
Answer the question
In order to leave comments, you need to log in
use guzzle, exception handling, sleep and console script, not web.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question