[SNIPPET] Multiple Fast Download URLs
I do not take credit for this, I found it on srcds.com forums and was impressed so I decided to post it here. Full credit for the work goes to gussy over at srcds forums. It basically allows you to run a php script that will let you use different fast download URLs for different files. It was posted 2 years ago, but despite my endless hours of forum browsing I had never seen it.
Original thread can be found here... http://forums.srcds.com/viewtopic/4464 PHP Code:
|
Re: [SNIPPET] Multiple Fast Download URLs
If you had 2 websites in different locations you could add geoip and choose the closest website to the person downloading the files. Sort of like CDN? But I dont see who would need that...
|
Re: [SNIPPET] Multiple Fast Download URLs
kinda useful :) a lot of our europe players download pretty slow off our US based servers. would be nice to setup fast downloads in asia/europe for them. thanks
|
Re: [SNIPPET] Multiple Fast Download URLs
Quote:
Quote:
|
Re: [SNIPPET] Multiple Fast Download URLs
Ya I know, just a though though if that wasnt the case.
|
Re: [SNIPPET] Multiple Fast Download URLs
What directory should I upload it?
|
Re: [SNIPPET] Multiple Fast Download URLs
Interesting indeed.
|
Re: [SNIPPET] Multiple Fast Download URLs
I have made similar script
Feature: - Switching mirror every download request (simple bandwidth balancer) - Checking if file exist on mirror and if not, checking another mirror. If file cant be found on any mirror sends to client "404 Not Found". PHP Code:
now sv_downloadurl should looks like this: sv_downloadurl "http://main.wsciekle.pl/fd_redir.php?fn=" also you can create folder for example "fastdownload" and put to it file .htaccess with something like this: PHP Code:
sv_downloadurl "http://main.wsciekle.pl/fastdownload" Working example: http://fastdownload.wsciekle.pl/maps...ood_rm.bsp.bz2 download, check source, download, check source |
Re: [SNIPPET] Multiple Fast Download URLs
If fpsbanana was smart, they could create a system to make everything bziped and offer a service to let server ops use their mirrors and files to download from.
|
Re: [SNIPPET] Multiple Fast Download URLs
i published mirror script so i must publish this too
PHP Code:
This example allow donwload files for clients on servers: 91.91.91.91 port 27015 and 91.204.162.240 on any port You can test this with FireFox and RefControl Addon. Exactly same file is on http://fastdownload.strefa-source.pl try to reach this site using referer hl2://91.91.91.91:27015 and some other hl2:// |
Re: [SNIPPET] Multiple Fast Download URLs
Quote:
|
Re: [SNIPPET] Multiple Fast Download URLs
remove
PHP Code:
|
Re: [SNIPPET] Multiple Fast Download URLs
i have already tried it, but it breaks all downloads, also from gameserver
apache2 log: Code:
xx.xx.xx.xx - - [02/Jul/2010:04:55:32 +0700] "GET /fastdownload/sound/ambient/zombiemod/zombie_ambient.mp3.bz2 HTTP/1.1" 302 689 "hl2://xx.xx.xx.xx:27015" "Half-Life 2" |
| All times are GMT -4. The time now is 18:26. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.