RE: [PHP] Re: file downloads (again)

From: Date: Tue, 18 Jun 2002 01:31:10 +0000
Subject: RE: [PHP] Re: file downloads (again)
Groups: php.general 
Request: Send a blank email to php-general+get-102633@lists.php.net to get a copy of this message
This is the reply I just made to Fargo Lee (subject: How do I hide download link ...) Maybe this can help ? ---- Start ---- Have a page that checks the user's authentication if they're "invalid" then display an error msg and exit the script otherwise, send the header command(s) for attaching a file (can't remember the exact syntax right now) read the file from somewhere that's not accessable from the web and spit it out to the browser HTH Martin ---- End ---- -----Original Message----- From: Justin French [mailto:justin@indent.com.au] Sent: Tuesday, June 18, 2002 11:28 AM To: php-general@lists.php.net Subject: Re: [PHP] Re: file downloads (again) on 17/06/02 9:08 PM, Jason Wong (php-general@gremlins.com.hk) wrote: > Those usually work by using a META tag to refresh to the actual download > script. View source of said page to find out how it works. Hmmm, I can't see the refresh in the HTML, but that's okay, it sounds like a good plan, EXCEPT that the URL I refresh to is now in plain view, and not necessarily hidden from the user. What would be nice is if I could incorporate my sessions into this somehow. I guess the refresh link could be a download.php?song=blah link, where if the session is there, and the user is validated, they get the MP3 pushed through. The only catch there is: a) save as may not work (download file to disk) b) if it does, the file will be called download.php, not something.mp3, which might mess with some systems Any thoughts? Justin French -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#102633) next »