How to use fopen() with protected directory (i.e .htaccess)

From: Date: Tue, 11 Feb 2003 05:22:46 +0000
Subject: How to use fopen() with protected directory (i.e .htaccess)
Groups: php.general 
Request: Send a blank email to php-general+get-135158@lists.php.net to get a copy of this message
How can I pass in a user/pw to an fopen() (or something similar)? I am trying to render a dynamic db/php page into a static .html page -- or more specifically, I'm trying to email me back an html version of a report page on remote servers. The reports are located behind an https:// Apache user/pass authenticated directory. I tried: $file = fopen("https://username:password@www.myserver.com/admin/report.php","r") ; If I try to do something like: $file = fopen("/www/htdocs/admin/report.php","r"); But then the PHP isn't executed, it just dumps me the straight source code.

« previous php.general (#135158) next »