Need help with PEAR::Auth and fopen
| From: | GIMENEZ Florent | Date: | Wed, 03 Aug 2005 16:28:43 +0000 |
| Subject: | Need help with PEAR::Auth and fopen | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-20241@lists.php.net to get a copy of this message | ||
Hi,
I'm trying to use fopen on a Auth protected file, but the only thing i get
is the identification page...
I've tryed passing the sid in the url, but my browser didn't like that (the
webpage were blocking the system)...
That is what i tryed :
----------------------------------------------------------------------------
------------------------------
$contenu="";
$sid=session_id();
$url="http://www.mywebsite.com/protectedbyauth.php?PHPSESSID=".$sid."&id_pag
e=".$id_page;
$fichier = fopen($url,"r");
//getting the content of the page
while (!feof($fichier)){
$contenu .= fgets($fichier,4096);
}
fclose($fichier);
// generating a static file from the page
$file = tempnam("/tmp","F00");
$fd = fopen($file,"w");
fwrite($fd,$contenu);
fclose($fd);
----------------------------------------------------------------------------
----------------------------------
Have you a clue to resolve this ?
Florent GIMENEZ
Administrateur Reseau ADENEO