To extend the timeout, you can use the 'timeout' name/value pair inside of the 'http' options. E.g. put it under here:
'content' => ...
'timeout' => 120.0
(Reference: http://www.php.net/manual/en/context.http.php)
My guess, though, is that something else is amiss. You might use file_get_contents()
instead of qp()
to fetch the file, and then pass the string into QueryPath. At least from that point you will be debugging the network issue, and not QueryPath.
For working with OpenAmplify, I've also had great luck with using the CURL API, but that is a little more complex than the built-in PHP stream wrapper (Reference: http://www.php.net/manual/en/book.curl.php).