Reply to Re: [PHP] xml->load via dom and http authentication

Your name:

Reply:


Posted by Curt Zirzow on 12/03/05 20:00

On Thu, Dec 01, 2005 at 11:31:45AM -0800, jonathan wrote:
> i'm loading a dynamically generated xml file like this:
>
>
> $xml=new DomDocument();
> $xml->load("menu_render.php?menu_id=$menu_id&format=xml");
>
> The problem is that this file is in a directory that requires http
> authentication (via the .htpasswds file).
>
> How could I specify the uname and pwd loading this? I'm using php5
> and apache 1.3.33

I'm assuming you actually have something like:
$xml->load("http://hostname/menu_render.php?menu_id=$menu_id&format=xml");

Just specify the username and pass in the url:
http://username:password@hostname/menu_render.php?...');

Curt.
--
cat .signature: No such file or directory

[Back to original 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

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