Re: Controlling DomDocument's load and loadHTMLFile Request

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, June 6, 2006 3:16 pm, Jochem Maas wrote:
> 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
>
> holy crap - someone has done a mega job of padding out the streams
> related docs :-)
> or at least so it seems to me (since I last attempted to get a good
> understanding or
> streams ... rather than relying on Richard Lynch's efforts ;-)

now that's scary, considering how confused I got by the stream
rewriters, remappers, redirectors, and whatnot...

Though if the docs are expanded, that would help TONS.

Big thanks to SOMEBODY "out there"

-- 
Like Music?
http://l-i-e.com/artists.htm

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux