File linking

I created a PHP script called download.php and to download a file, I would post a link on my site ./download.php?

and it will download the file from a web directory. How can I prevent people from hotlinking (lets say they put the link on their server or just type the URL in themselves).

I tried using the same concept as with image hot linking by adding zip to the line, but it still let me download the files.

Any ideas?