Re: xml->load via dom and http authentication

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux