My Download Script

Started on the old forum in November 2007 · view the original in the archive · old links redirect here

32 replies · 2,408 views · started 19 years ago · 1 min read

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.

6 participants
Guest #21

can i make, or how can i make subfolders?

subfolders for what??

Guest #22

for example, i make a Java games section and i want subfolders with : sports, action, arcade, etc... Do you feel me?

wapodium #23

for example, i make a Java games section and i want subfolders with : sports, action, arcade, etc... Do you feel me?

make another config. or you can make it as a flat (no config) try to look at this one. lot of subfolders. lolz

Guest #25

i thought you guys would never ask for . i have it ill post it later

Guest #28

wapodium 's script.

@ SpiderWap , can i make sub directories with your download script??? or maybe i should ask how.

Guest #29

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();

}
Guest #31

just create folders called mp3, pictures and add that code in them lol

wapodium #32

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.

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close