How to hide Download Link (with PHP)

In this video I have shown how you can hide the real download path in PHP.
This example is best suitable for hiding only some URLs as this works purely hard coded. If you have a lot of links to be hidden you will have to do it by using any database.
Please see the below link for that,
Hide/Custom download path for files PHP using MySQL Database

1. So we are going to make a long download path like,

to a simple path like,

2. Below is shown an example download links. One is direct download and the second one is by using another page download.php

3. Actually when the user clicks the download link. It redirects to download.php with an id for each file.
from download.php the id is received and the path for the file is set from that page.

4. Complete scenario of download is shown below.

5.This method will work for all type of files like JPG,xls,doc,pdf,zip,rar etc