pobox@xxxxxxxxxxxxx wrote:
hello,
i wrote a small RSS reader using file_get_contents to get the XML from
the URI - however i noticed that this does not leave trace (User Agent)
in the remote server logs.
is there a way in PHP to get XML from URI and leave UA trace in the
remote server logs?
thanks,
iv
Found it -
$options = array('http' => array('header'=>"User-Agent: foo bar"));
$context = stream_context_create($options);
$XML = file_get_contents($URI, NULL, $context);
Thanks anyway :o)
Iv
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php