Hi guys,
I want to make http://localhost/download2.php inaccessible if anyone tries to access it directly. Instead it will only be accessible if it has been refered from http://localhost/download1.php
Is that possible? Thnx in advance...
if ($_SERVER['HTTP_REFERER'] == 'http://localhost/download1.php') { // echo HTML } else { echo 'sorry, you must first go thru http://localhost/download1.php'; }
be advised: $_SERVER['HTTP_REFERER'] is not very reliable.
I was using only cookies. But now, both cookies and referer check. THANKS TO YOU.
One more question, can you please tell me how to use multiple referers?