file access(mpeg) only for authenticated people

From: Date: Wed, 07 Mar 2001 09:45:56 +0000
Subject: file access(mpeg) only for authenticated people
Groups: php.general 
Request: Send a blank email to php-general+get-42885@lists.php.net to get a copy of this message
Hi! I'm trying to make some mpegs available only to people who authenticated themselves using php. But all the solutions I found somewhat unpleasant because I uses chmod to set the file attributes to u=rw and then used either i) readfile("ftp://name:password@server/path//test.mpeg"); or ii) header ("Location: ftp://name:password@server/path/test.mpeg"); But in case i) the browser asks if I want to download the file or view it. If I choose view the browser suggests to save the movie as myscript.php and if I choose view it ´doesn't display anything. ii.) the browser displayes my username and password in the statusbar And in both cases it downloads the whole file(I guess cause I use ftp) before starting the mpeg programm(where nothing happens afterwards in case i) Is there a better way? ´Like telling the server via http my login data and sending the file to the users browser? Thanks Thorsten

« previous php.general (#42885) next »