My Download Script
Started on the old forum in November 2007 · view the original in the archive · old links redirect here
TL;DR · summary of 32 replies
- -the script has issues downloading all images at once, solutions include using PHP codes to resize those images or implementing thumbnails.
- -subfolders for different sections like Java games can be created with the help of a config file or by making it flat (no config).
- -The code provided in the thread is complex and not easily understandable without prior knowledge.
Written automatically from the replies by a language model on our own server. It can be wrong; the posts below are the source.
CODE<?php
include("../config.php"); include("../core.php");
if($mime== WEB) { echo "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>"; echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">";
}else{ echo "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>"; echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"". " \"http://www.wapforum.org/DTD/wml_1.1.xml\">"; }
$bcon = connectdb();
if (!$bcon)
{
echo dberror($mime);
}
$getuthm = mysql_fetch_array(mysql_query("SELECT theme FROM jayd_users WHERE id='".$uid."'")); $uth = $getuthm[0]; if(!$uth=="") { $uthm = "$uth"; $uthm = utheme($uthm); }else{ $uthm = "../default.css"; } $action = $_GET["action"]; $page = $_GET["page"]; $who = $_GET["who"]; $brws = explode(" ",$HTTP_USER_AGENT); $ubr = $brws[0]; $uip = getip(); $id=$_GET["id"];
$stitle = "Downloads";
if((islogged($ses)==false)||($uid==0))
{
echo notlogged($mime);
}
if(isipbanned($uip,$ubr))
{
if(!isshield(getuid_ses($ses)))
{
echo useripbanned($mime,$uip,$ubr);
}
}
//echo isbanned($uid);
if(isbanned($uid))
{
echo userbanned($mime,$uid);
}
if($mime== WEB)
{
echo webhead($uthm,$stitle);
echo "
"; addonline(getuid_ses($ses),"Downloading full mp3s","");
if (!isset($page)) {$page = 0;} $total = 0;
if(!($dp = opendir("./"))) die ("Cannot open ./"); $file_array = array(); while ($file = readdir ($dp)) { if(substr($file,0,1) != '.' and $file != "index.php" and $file != "search.php") { $file_array[] = $file; } } $file_count = count ($file_array); sort ($file_array); if ($file_count > 0) { $first_record = $page * $conf["items_per_page"]; $last_record = $first_record + $conf["items_per_page"];
while (list($fileIndexValue, $file_name) = each ($file_array)) {
if (($fileIndexValue >= $first_record) AND ($fileIndexValue < $last_record)) {
echo "<a href="$file_name">$file_name</a> (". round(filesize($file_name)/1024,1) . "kb)<hr/>"; $total = $total + filesize($file_name); } }
if (($file_count > 0) AND ($page != 0)) { // previous button $prev_page = $page -1; echo " <a href="".$_SERVER["PHP_SELF"]."?page=$prev_page">Prev Page</a> "; }
if (($file_count > 0) AND ($last_record < $file_count)) { // next button $next_page = $page + 1; echo " <a href="".$_SERVER["PHP_SELF"]."?page=$next_page">Next Page</a> "; }
if ($file_count == 1) {echo "file";} else {echo "files";}
echo " (" . round($total/1024,1) . "kb)"; } closedir($dp);
echo "<img src="images/home.gif" alt=""/><a href="index.php?action=main&ses=$ses">Home</a>"; echo " "; echo " <table><tr><td><a href="index.php?action=logout&ses=$ses">Logout</a>|<a href="http://ebuzz.uni.cc/page1.php">E-News</a>|<a href="http://ebuzz.uni.cc/partners.php">Partners</a>|<a href="http://ebuzz.uni.cc/index.php?action=viewuser&who=floyd&ses=$ses">E-book</a>|<a href="http://lavalair.net">Blaze</a></td></tr></table>"; echo " <table><tr><td>© e-buzz 2007 edited by Floyd All rights reserved*</td></tr></table> ";
echo webfoot();
}
hm... i'm a n00b External image (may be gone), i'm lost External image (may be gone)
can you give me that script please? External image (may be gone)
ill post it when i have the time decrypting it. lolz. its a flat file with lot of subfolders so its kinda big in size.
Well heres the demo url, and script, enjoy ppl...
And please don't steel my downloads on my site, took a lot of time to do it all....
Thanx
Sorry, by axcident attached the same script twice
lol http://hifi-project.ro/download/download.zip External image (may be gone)
www.inbuzunar.mobi -Your mobile portal pocket