Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    him
    him is offline
    New Coder
    Join Date
    Mar 2003
    Location
    +44
    Posts
    56
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Download Script -- Simlar to download.com

    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:

    http://download.com.com/3000-2140-10...ml?tag=lst-0-7

    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,
    him

  • #2
    Regular Coder
    Join Date
    Jan 2003
    Posts
    867
    Thanks
    4
    Thanked 8 Times in 8 Posts
    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.

    <%
    id=request.querystring("id")

    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.

  • #3
    him
    him is offline
    New Coder
    Join Date
    Mar 2003
    Location
    +44
    Posts
    56
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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:

    http://www.mp3sfinder.com/download.p...2&type=Archive

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

    http://www.mp3sfinder.com/minime.php...40217877825102

    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...

    thanks,
    him

  • #4
    New Coder
    Join Date
    Jul 2002
    Location
    Detroit MI
    Posts
    40
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •