I have a php page which cron runs to create html pages from php pages at a regular interval. It was working fine until we password protected the site with a .htaccess file. Now the output hmtl files are just an error saying authentication required on line 35. Line 35 is the readfile() command below...
ob_start();
readfile("http://site.com/area.php?areaname=$areaname");
$htmldata = ob_get_contents();
ob_end_clean();
Does anyone know how to use readfile when the file needs username and password authentication?