Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- How to authenticate when using SimpleXML
- Andrew Taylor
March 14, 2007, 9:02 am
rate this thread
I've got an RSS feed I'd like to consume from our Sharepoint server.
When I try:
$xml = simplexml_load_file($url);
failed to open stream: HTTP request failed! HTTP/1.1 401 Unauthorized
This is understandable as I need to specify a username and password to
access the RSS. How can I do this with SimpleXML, or, should I first
call the URL with cURL and work with the stream locally?
I thought there may be some global params I could set for the stream
handling library of PHP.
Re: How to authenticate when using SimpleXML
Would be a solution, or if it's basic HTTP authentication you can use it=
in the URL like http://username:firstname.lastname@example.org/rss.xml. cURL might=
be a bit heavy for it, using fsockopen() could also be made to work.
Posted on Usenet, not any forum you might see this in.
Ask Smart Questions: http://tinyurl.com/anel