Protect your links to dowload

hamza

New member
Registered
Joined
Aug 18, 2013
Messages
1
Points
0
Hello,
As long as I asked myself how can I protect my download links, and I Gath, this is a really wonderful site.
Site allows you to protect your links different types of robots.
Will not have to register.
The address of the site: loturl.com
 

Jack London

Well-known member
Joined
Jul 9, 2012
Messages
158
Points
18
Hi Gath,

You can use this code
First you need to create download file
and if you want to share your link, put is like your-domain,com/download.php?fid=456
Code:
<?php
if(isset($_GET['fid'])){
$file = $_GET['fid'];
$info = pathinfo($file);
// get file link from your database
if(file_exists($file)){
header('Content-disposition: attachment; filename='.$file);
header('Content-type: application/'. $info['extenstion']);
readfile($file);
}
}
else{
exit('you can not download');
}
?>
Hope it's helpful to you!
 
Older Threads
Newer Threads
Replies
7
Views
3,910
Replies
1
Views
4,115
Replies
0
Views
2,316
Replies
8
Views
5,070
Latest Threads
Replies
2
Views
67
Replies
2
Views
71
Replies
1
Views
143
Replies
4
Views
129
Recommended Threads
Replies
7
Views
3,707
Replies
1
Views
1,708
Replies
1
Views
2,645
Replies
12
Views
4,729

Latest Hosting OffersNew Reviews

Sponsors

Tag Cloud

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top