Exactly what I needed.  Thank you!

Rasmus Lerdorf wrote:
Shu Chow wrote:
Is there any way to alter the header of DomDocument's load/loadHTMLFile request? I have a file that will display certain content for certain user agents. I'd like to be able to spoof the UA of the request.

Ah, a good question the answer to which demonstrates the magic of PHP 5's stream contexts which is meant to solve this exact problem.

The example in the documentation is even exactly the user-agent one.  See:

  http://php.net/libxml_set_streams_context

-Rasmus

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to