Re: protected Images without using htaccess

From: Date: Sat, 23 Jun 2001 02:11:11 +0000
Subject: Re: protected Images without using htaccess
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-54951@lists.php.net to get a copy of this message
Hi, and the shorthand for this : <?php $img=ImageCreateFromJPEG($filename); ImageJPEG($img); ?> Thanks Arash Dejkam ""Fredrik Arild Takle"" <ftakle@online.no> wrote in message news:9gvl19$er6$1@w153.z064000151.sjc-ca.dsl.cnc.net... > 1. Authenticate user > 2. Put the pictures in a "secret" folder or outside http_root > 3. Do this: > > <?php > header("Content-Type: application/download\n"); > header("Content-Disposition: filename=\"$file\""); > $fn = fopen("$file" , "r"); > fpassthru($fn); > ?> > > I hope this helps! > > Fredrik A. Takle > fredrik@iPortal1.com > www.iportal1.com >

« previous php.general (#54951) next »