I've confirmed via curl -H on the command line that I can do it properly and get an HTTP 304 as expected, but I don't know what I'm not doing right with libxml_set_streams_context(). Here's my code:
$opts = array('http'=>array('method'=>"GET", 'header'=>"If-Modified- Since: Wed, 18 May 2005 23:55:29 GMT\r\n"));
$context = stream_context_create($opts);
libxml_set_streams_context($context);
$doc->load('http://www.somewhere.com/somefile.xml');
echo $doc->saveXML();
using the same $context resource, this also produces the same result, when I expect it should work.
file_get_contents('http://www.somewhere.com/somefile.xml', false, $context);
I have php 5.0.4 compiled with libxml2 (2.6.16) on Mac OS X 10.4. I imagine I'm not doing something correctly, but can't figure out what it is.
Any help?
-- Bill Hoffman xbhoff@xxxxxxx
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php