Web Hosting Talk







View Full Version : Downloading Script


qubefactor
03-15-2005, 10:12 PM
Hi all. I occasionally host some large (~50 mb) files which recieve many hits and I was wondering if there was some sort of script that would create a "downloading page" rather than just going to the file directly...i.e.

http://www.qubefactor.com/example.zip would bring the user to a website where they would see a page that had an advertisment for me as well as a link to download the actual file.

Thanks!

Ian

BenEDH
03-15-2005, 11:02 PM
I can't remember offhand, but I used to use Schlabo's(?) Scripts a few years back... Many, many years back...

I'd sure theres something better nowadays on HotScripts :)

mfonda
03-15-2005, 11:21 PM
What I would recommend doing, is writing a little PHP script that will display your ads, then go into the download.

The only thing with this is, you would have something like
http://www.qubefactor.com/download.php?file=example.zip

1jetsam
03-15-2005, 11:28 PM
I made a simple script that does that. It works like so:
http://www.qubefactor.com/r.php?i=1

Basically it re-directs the visitor to that download. It is useful if you want to change the download directory, and also, no one can really find the direct link to that download.

You can download it here:
http://quate.xedhost.com/project.php
Click on the "Link-Count" project, and click download.

The reason I do not have a download link is because my host has unstable MySQL, so pages that use MySQL can't load, or return an error. Thats what happening right now. It switches from time to time, so I'd expect it to be back normal again in an hour (and then switch to not working again).

artofmobile
03-15-2005, 11:30 PM
Hope this help:

Turn on the RewriteEngine and make use of RewriteRule to route your download file to a script. In your script display your advertisment and use javascript to open another session to download the file.

qubefactor
03-15-2005, 11:54 PM
Thanks for the help. I found schlabo's script to do the job just fine.

BenEDH
03-16-2005, 12:09 AM
Glad I could be of service to you :)