Expanded mirroring script to all dependencies, added new mirror (mirumu.jp) and updated download scripts.

This commit is contained in:
Matthew
2010-09-05 16:34:05 +12:00
parent f8d537c0c5
commit c69a741c90
12 changed files with 55 additions and 27 deletions

30
web/get-dependency.php Normal file
View File

@@ -0,0 +1,30 @@
<?php
$mirrors_file = "";
switch ($_GET["file"])
{
case "ra":
$mirrors_file = "packages/ra-mirrors.txt";
break;
case "cnc":
$mirrors_file = "packages/cnc-mirrors.txt";
break;
case "osx":
$mirrors_file = "releases/mac/osx-dependencies-mirrors.txt";
break;
case "freetype":
$mirrors_file = "releases/windows/freetype-mirrors.txt";
break;
case "cg":
$mirrors_file = "releases/windows/cg-mirrors.txt";
break;
default:
break;
}
$mirrors = file_get_contents($mirrors_file);
$mirrors_array = explode("\n", $mirrors);
$mirror = $mirrors_array[array_rand($mirrors_array, 1)];
header('Location: '. $mirror);
?>