Hello,i want to hide my actual download link from my website. when anyone click the contents they got direct download link.

here is my code

$get_path=explode("/downloads/",$path[0]);
$filename=$get_path[1];
$download=$get_path[0]."/downloads/".$filename;
echo "<a href=\"".$download."\">Get File</a>";

they got direct link like this

http://localhost/downloads/cpanel.gif

i want to make it like http://localhost/downloads/6885a6c38d6e9bcc201326902269658a (its md5)
or any other method you should prefer.

thnx

Recommended Answers

All 2 Replies

Do you want to have a specific download link depending on the customer (i.e a secure download system), or simply mask the download link?

If it's the latter, you could always have a script like:

<?php
header('Location: http://www.example.org/path/to/download/file.pdf');
?>

And then link to the PHP file. This way they'll see the PHP file and not the download link itself (I think)

its secure file system

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.