I need to load an xml document (DOMDocument->load). But sometimes it takes too long before a response is received and it fails. So my question is can I somehow extend this period ?
@NogDogJul 09.2010 — #You might also consider using the cURL functions to retrieve the text (I'm assuming this is a remote URL and not a local file?), in which case there are a number of options via curl_setopt() you can set with regard to network timeouts. You would then use the loadXML() method instead of load().
@jeanlucaauthorJul 10.2010 — #sounds like an interesting solution. So if I understand correctly, you download the xml file using curl, and you have to put the result in loadXML, right ?
@NogDogJul 10.2010 — #sounds like an interesting solution. So if I understand correctly, you download the xml file using curl, and you have to put the result in loadXML, right ?
thnx[/QUOTE]
Yep, that's what I was thinking. Plus I've heard some claims that cURL is faster than using a URL in "regular" PHP functions, though I have no idea why that would be, nor have I tried testing it.