View Full Version : Download Script -- Simlar to download.com

03-31-2003, 10:55 AM
hello....i have been searching over the interent to find a simlar script to download.com....i am new to here..so please help me out...

you know in download.com, when you choose a program..you would probably see a screen like below:


then when you click "Download NOW"...you will then be redirect to other pages, which connecting to the third-party server...and start automatically download...(come up a box)

my question is:

how do you create a script to connect to the server without showing the actual links to the visitor??

e.g. http://download.com.com/3001-2140-10194461.html

thanks for helping,

03-31-2003, 03:14 PM
Keep in mind that it's probably possible for the user to see where they are downloading the file from even if you obscure it. The user can always find out just as much information as the browser, so if the browser knows where to download the file from, the user can figure it out also. (I think this is true, but I'm not sure).

In ASP, have one page with a link and an ID:

<a href="dl.asp?id=15">Download program</a>

Then on dl.asp, you could either statically have all those numbers setup or look them up in a database.


if id="1" then
response.redirect "/where_you_store_your_programs/file1.exe"
elseif id="2" then
elseif id="15" then
response.redirect "/where_you_store_your_programs/file15.exe"
end if

This is better suited for a server side language, but you should be able to do something similar with javascript. It will just be easier for the user to see the links. With server side, you can force the download box, but Windows forces that for executable files anyways.

03-31-2003, 04:00 PM
oops....i didn't know that i shouldn't post in the java script session..anyway..thank you arnyic reply first...ermm...here is the senond example that i want:


after you click "Download"...it will go to..


the point i don't want people to see the links because i don't want to upload them and let people to steal the links...=(

one other question....do you know how to force a download diagloue box come up whatever the file type is...


04-05-2003, 05:23 AM
First off, that was a really bad example considering that they "banned" Netscape... Not to mention after about 30 seconds of snooping I was able to get the filepath.

It depends on your webhost (what server they are running, ssl's they are running, etc.)