Re: leaving UA trace when getting XML from URI
| From: | pobox@verysmall.org | Date: | Wed, 27 Jun 2007 12:56:19 +0000 |
| Subject: | Re: leaving UA trace when getting XML from URI | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-257854@lists.php.net to get a copy of this message | ||
pobox@verysmall.org 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, ivFound 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