You are here: Re: How to authenticate when using SimpleXML « PHP Programming Language « IT news, forums, messages
Re: How to authenticate when using SimpleXML

Posted by Rik on 03/14/07 09:16

Andrew <Taylor> wrote:

> Hi,
>
> I've got an RSS feed I'd like to consume from our Sharepoint server. =

> When I try:
>
> $xml =3D simplexml_load_file($url);
>
> I get
>
> 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?

Would be a solution, or if it's basic HTTP authentication you can use it=
=

in the URL like http://username:password@example.com/rss.xml. cURL might=
=

be a bit heavy for it, using fsockopen() could also be made to work.

-- =

Rik Wasmus
Posted on Usenet, not any forum you might see this in.
Ask Smart Questions: http://tinyurl.com/anel

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация