#PART 4:: Create upload.php upload download links in database
this article for those who want to develop Security & Privacy Download any
files to authorized person or members...............
Make your files secure download
Make your download folder secure
Make download link secure.............visitors Or members may keeps & share your
download links for future download thousand's time same link from unauthorized
place & sites.
So keep safe your download link & safe your bandwidth.
DO encrypt in md5 to every download links
Keep tracking your download links.
Only allow to authorize persons or your members..............etc
much more were have in this tutorials & articles share my knowledge's with yours
I hope you like it. :)
Terms of Agreement:
By using this article, you agree to the following terms...
You may use
this article in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
You MAY NOT redistribute this article (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.
You may link to this article from another website, but ONLY if it is not wrapped in a frame.
You will abide by any additional copyright restrictions which the author may have placed in the article or article's description.
Part: 4
Create upload.php upload download links in database
<?php
// location of download folder.
$dir="download/";
// Database table.
$sqlAll= mysql_query("SELECT * FROM download ORDER BY no");
// Function to make file size in KB MB ............
function format_size($size) {
$sizes = array(" Bytes", " KB", " MB", " GB", " TB", " PB", " EB", " ZB", "
YB");
if ($size == 0) { return('n/a'); } else {
return (round($size/pow(1024, ($i = floor(log($size, 1024)))), $i > 1 ? 2 :
0) . $sizes[$i]); }
}
// ADD your secure links into database convert real file name in to MD5
echo "<li><b>$file</b> <tt>". format_size($size) ." <a href='index.php?axn=upload&file=".md5($file)."&name=".$file."&size=".format_size($size)."'
>Add=>></a></tt></li>";
// Display All secure links from database or u may DELETE the links from
database
while($files= mysql_fetch_array($sqlAll)){
echo "<li><b>".$files['f_name'] . "</b> <tt><b>Size:</b>".$files['f_size'] .
"</tt> <tt>Code:</tt><tt class='error'>" . $files['f_file']."</tt>";
echo "<a href='index.php?axn=upload&file=".$files['f_file']."&id=".$files['no']."'
><img src='images/delete.gif' ></a></li>";
}
echo "</ol></td></tr>";
echo "</table>";
// ADD Requested to store secure links into database
if(($_GET['file']!='') && ($_GET['name']!='')){
require('file_add_ok.php');
}
// DELETE Requested to store secure links into database
if(($_GET['file']!='') && ($_GET['id']!='')){
require('file_delete_ok.php');
}
is this the whle code as it sais part 4? (If this comment was disrespectful, please report it.)
Add Your Feedback
Your feedback will be posted below and an email sent to
the author. Please remember that the author was kind enough to
share this with you, so any criticisms must be stated politely, or they
will be deleted. (For feedback not related to this particular article, please
click here instead.)