Re: xml->load via dom and http authentication
| From: | Curt Zirzow | Date: | Sat, 03 Dec 2005 18:00:17 +0000 |
| Subject: | Re: xml->load via dom and http authentication | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-226811@lists.php.net to get a copy of this message | ||
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