Re: Blocking the direct download of a file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 5/7/07, Jon Anderson <jon@xxxxxxxxxxxxxxxxxx> wrote:
if (strpos($_SERVER['HTTP_REFERER'],'http://www.myweb.com/') === 0) {
    header('Content-Type: application/java-archive');
    readfile('/path/to/real/jarfile.jar');
    exit(0);
}


$_SERVER['HTTP_REFERER'] is unreliable.

http://us2.php.net/manual/en/reserved.variables.php#reserved.variables.server



--
Greg Donald
http://destiney.com/

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux