-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

* and then Miguel Cruz declared....
> > I use an class to handle all the auth stuff and each page checks the
> > value of $obj->logged_in :: No problem.
> > 
> > but what if someone links to www.thesite/theProtectedArea/file.tar.gz
> > 
> > that file cannot check if the downloader is logged in can it.
> 
> download.php:
> 
>   <?
> 
>   if (userIsAuthorized)
>   {
>      header('Content-Type: application/x-gzip');
>      readfile('secret-name-of-file.tar.gz');
>      exit;
>   }
>   else
>   {
>      print 'You are not authorized to download this file.';
>   }
> 
> ?>

Fantastic, so simple!
Does anyone know of somewhere that lists content-type's?

Many thanks :-)
- -- 
Nick Wilson     //  www.explodingnet.com



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)

iD8DBQE83OgUHpvrrTa6L5oRAkdEAJ4wwvkgfRAXYNqg+Cf4uuwZDz8mOACdE091
do6OoY5f2HoTiRM3sGGFSeQ=
=Cirg
-----END PGP SIGNATURE-----

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to