Please Wait X Seconds... Url Revealer

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bigpoppa
    New Member
    • Jun 2006
    • 3

    Please Wait X Seconds... Url Revealer

    Hey I need help (doesn't everyone?) on a script. The script functions like this:
    Please wait X seconds for download (for example x=15 seconds)
    Please wait 14 seconds for download (and then a second later)
    Please wait 13 seconds for download... (process keeps repeating)
    Click here to download the file you requested (occurs at 0 seconds)

    Does anyone know of a script like that one? I have seen many sites use it including megaupload.com. I am running a site with many downloads and the ones that are files over 3 megabytes must have a timer inorder to conserve bandwidth (and files over 5 megabytes download speed will be limited to 25kbps, but I have found a script on how to do that using php). If you know what language this script is written in (I am guessing javascript or php) and could possible provide me with an example or a place I can find that script it would be of a great help to me. Thanks a bunch.
  • iam_clint
    Recognized Expert Top Contributor
    • Jul 2006
    • 1207

    #2
    Code:
    <html>
    <body onload="waittimer();">
    <script>
    var secs
    var timerID = null
    var timerRunning = false
    var delay = 1000
    function waittimer() {
    	secs = 10
    	StopTheClock()
    	StartTheTimer()
    }
    function StopTheClock() {
        if(timerRunning)
            clearTimeout(timerID)
        timerRunning = false
    }
    function StartTheTimer() {
        if (secs==0)
        {
         	     StopTheClock()
    	document.getElementById("time").innerHTML = '<a href="downloadlink.exe">Link</a>'
                 
        }
        else
        {
            document.getElementById("time").innerHTML = secs + " SECONDS Untill Download"
            secs = secs - 1
            timerRunning = true
            timerID = self.setTimeout("StartTheTimer()", delay)
        }
    }
    
    </script>
    <div id="time"></div>
    </body>
    </html>
    heres a small example i made up for you se you get todo the rest :P its a countdown yadda yadda if you need help with it let me know

    Comment

    • bigpoppa
      New Member
      • Jun 2006
      • 3

      #3
      HOLY KDJSFKFJDS THANX 200000X. I spent over 2 hours searching for this type of script... you are my hero :)

      Comment

      Working...