This is a discussion on Download with timer? within the Shell scripting forums, part of the Development/Scripting category; First of all Happy New Year to everyone! I'm not sure this is the right place to ask but..I hope ...
|
|||||||
| Register | FAQ | Members List | Calendar | Forgotten your password? | Mark Forums Read |
|
|||
|
First of all Happy New Year to everyone!
I'm not sure this is the right place to ask but..I hope someone will point me to the right directions. I need some sort of a script that will redirect a user to a .html page when he goes to a file. When the user is redirected to this html page there's a countdown timer - counting from 10, 9, 8....etc. When the timer reaches 0, the user is redirected to the file he requested. Makes sense? Every link will be on a html page (i.e. www.domain.com/files/file1.zip). I don't want the user to be able to directly download this file. Let me show you something like what I want in action. http://rapidshare.de/files/10258061/Rose.jpg.html As you see the file got renamed (somehow) to Rose.jpg.html - this is what I want (if possible). When you go to http://rapidshare.de/files/10258061/Rose.jpg.html there's a lot of stuff there but if you scroll down, there's the "Free" button which will display the image. My english is not that great but I hope you got the point. If someone can help me with this or point me to some directions....I'd really appreciate it. Thanks for reading Marin Micoriciu |
| Sponsored Links | ||
|
|
|
|||
|
I think you should able to do that with javascript or even php. Why you need shell scripts? any specific reason?
I think they are using something like Apahce Mod ReWrite support to redirect user. |
|
|||
|
I think it can be done with javascript and/or php but not sure how. I don't really want a shell script. I didn't know where to post so I posted here. Admins or mods, move this thread to another forum if necessary... I was just asking if someone knows how to do it
|
|
||||
|
Note sure what you want. I really don't know php or javascript. All I can say it is some sort of server programming along with apache. I saw the source code of both pages. When you uploaded Rose.jpg it was NOT stored on normal location it was somewhere in protected area so that you can not directly access or download it using wget. When you click on Free button it copies back file to random location or may be soft link and you can get it. Everytime download url changes and if u try to use wget it will not work
http://dl6.rapidshare.de/files/10258...08852/Rose.jpg http://dl6.rapidshare.de/files/10258...12407/Rose.jpg It is all hard core php programming I think along with MySQL to keep track of all uploaded and download files plus it use session along with Apache rewrite i guess.
__________________
Rocky Jr. You may have my body & soul, but you will never touch my pride! If you have knowledge, let others light their candles at it. Certified to work on HP-UX / Sun Solaris / RedHat |
|
||||
|
Let us say your download filename is
first.bmp Then your main page name is index.php. index.php redirects using rd.php index.php Code:
<?php
function redir_link( $url, $text )
{
?>
<?php echo( $text ); ?>
<?php
}
?>
<html>
<body>
<h1>Main menu:</h1>
<?php redir_link( 'first.jpg', 'Download first.jpg' ); ?>
</body>
</html>
Code:
<html>
<head>
<script language="Javascript">
function rdPage()
{
window.location='<?php echo( $_GET['url'] ); ?>';
}
function pageRdTimer()
{
window.setTimeout( "rdPage();", 5*1000 );
// 5*1000 == 5 second
}
</script>
</head>
<body onload="pageRdTimer()">
Please support us:
<h1>Here is my ad</h1>
Redirecting to download section please wait...
</body>
</html>
|
|
||||
|
I think you can try out some ad managemet software just search it using google
__________________
Rocky Jr. You may have my body & soul, but you will never touch my pride! If you have knowledge, let others light their candles at it. Certified to work on HP-UX / Sun Solaris / RedHat |
![]() |
| Bookmarks |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Inactivity timer for lighttpd | petu | Web servers | 0 | 03-11-2008 01:49 PM |
| gcc 3.4.6 rpm download | chiku | Linux software | 2 | 05-18-2007 05:21 PM |
| If error repeat the download? | karabaja | Shell scripting | 3 | 10-10-2006 03:32 AM |
| Linux desktop download | rogy | Linux software | 2 | 01-05-2006 08:06 PM |