Re: [PHP] protected Images without using htaccess

2001-06-23 Thread Arash Dejkam
Hi, and the shorthand for this : ?php $img=ImageCreateFromJPEG($filename); ImageJPEG($img); ? Thanks Arash Dejkam Fredrik Arild Takle [EMAIL PROTECTED] wrote in message 9gvl19$er6$[EMAIL PROTECTED]">news:9gvl19$er6$[EMAIL PROTECTED]... 1. Authenticate user 2. Put the pictures in a secret

[PHP] protected Images without using htaccess

2001-06-22 Thread Arash Dejkam
Hi, I'm going to make a page in which users (being authenticated by PHP session management) upload pictures and specify which other users can see those pictures, and I want all the process be automated, and I don't want to use Apache protection on directories, now I have a problem: if I store

Re: [PHP] protected Images without using htaccess

2001-06-22 Thread Fredrik Arild Takle
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 [EMAIL PROTECTED]

Re: [PHP] protected Images without using htaccess

2001-06-22 Thread Chris Lee
you are so close .. store the images outside the http root. have a php page verify the user and use header('content-type: image.jpeg'); readfile('/tmp/image.jpg'); there ya go. its the only way i can see. -- Chris Lee [EMAIL PROTECTED] Arash Dejkam [EMAIL PROTECTED] wrote in message

Re: [PHP] protected Images without using htaccess

2001-06-22 Thread Fredrik Arild Takle
added the wrong script... arghh... ?php Header(Content-type: image/gif); $fp = @fopen($img,rb); fpassthru($fp); fclose($fp); ? Fredrik Arild Takle [EMAIL PROTECTED] wrote in message 9gvl19$er6$[EMAIL PROTECTED]">news:9gvl19$er6$[EMAIL PROTECTED]... 1. Authenticate user 2. Put the