# HG changeset patch # User Pascal Bellard # Date 1295701051 -3600 # Node ID c2e157dc12a2ca748b6076a12711d0a41c9cebc9 # Parent 330a38ce55dc02d2bac31ee17aaaf3235b047597 mirror-tools: dir-generator.php uses mirros files diff -r 330a38ce55dc -r c2e157dc12a2 mirror-tools/stuff/var/www/slitaz/mirror/dir-generator.php --- a/mirror-tools/stuff/var/www/slitaz/mirror/dir-generator.php Sat Jan 22 04:28:47 2011 +0000 +++ b/mirror-tools/stuff/var/www/slitaz/mirror/dir-generator.php Sat Jan 22 13:57:31 2011 +0100 @@ -1,4 +1,20 @@ + + + + SliTaz mirror redirection + + + + + + +.pngMirrors: EOT; - $mirrors = array( - "switch.ch" => "http://mirror.switch.ch/ftp/mirror/slitaz/", - "gatech.edu" => "http://www.gtlib.gatech.edu/pub/slitaz/", - "tuxfamily.org" => "http://download.tuxfamily.org/slitaz/", - "lupaworld.com" => "http://mirror.lupaworld.com/slitaz/", - "ufpr.br" => "http://slitaz.c3sl.ufpr.br/", - "pina.si" => "ftp://ftp.pina.si/slitaz/", - "ibiblio.org" => "http://distro.ibiblio.org/pub/linux/distributions/slitaz/", - "vim.org" => "http://ftp.vim.org/ftp/os/Linux/distr/slitaz/", - "nedit.org" => "http://ftp.nedit.org/ftp/ftp/pub/os/Linux/distr/slitaz/", - "xemacs.org" => "http://ftp.ch.xemacs.org/ftp/pool/2/mirror/slitaz/", - "garr.it" => "http://slitaz.mirror.garr.it/mirrors/slitaz/", - ); + $mirrors = array(); + $fp = @fopen(dirname($_SERVER["SCRIPT_FILENAME"])."/mirrors","r"); + if ($fp) { + while (($line = fgets($fp)) !== false) { + $line = chop($line); + $url = parse_url($line); + if ($_SERVER["SERVER_NAME"] == $url['host']) continue; + $host = explode('.',$url['host']); + $mirrors[$host[count($host)-2].".". + $host[count($host)-1]] = $line; + } + } + fclose($fp); foreach($mirrors as $name => $url) { echo "$name\n"; } diff -r 330a38ce55dc -r c2e157dc12a2 mirror-tools/stuff/var/www/slitaz/mirror/floppies/builder/index.php --- a/mirror-tools/stuff/var/www/slitaz/mirror/floppies/builder/index.php Sat Jan 22 04:28:47 2011 +0000 +++ b/mirror-tools/stuff/var/www/slitaz/mirror/floppies/builder/index.php Sat Jan 22 13:57:31 2011 +0100 @@ -1,4 +1,19 @@ + + + + SliTaz Boot Floppies redirection + + + + + + + "360 KB", "737280" => "720 KB", + "1228800" => "1.20 MB", "1474560" => "1.44 MB", "1638400" => "1.60 MB", "1720320" => "1.68 MB", "1763328" => "1.72 MB", "1784832" => "1.74 MB", "1802240" => "1.76 MB", "1884160" => "1.84 MB", "1966080" => "1.92 MB", "2015232" => "1.96 MB", "2949120" => "2.88 MB", + "3440640" => "3.36 MB", "3526656" => "3.44 MB", + "3932160" => "3.84 MB", "4030464" => "3.92 MB", "0" => "no limit" ); @@ -319,7 +340,7 @@ $options[-3] = "Ask"; $options[-2] = "Ext"; $options[-1] = "Std"; - for ($i = 0; $i < 32; $i++) $options[$i] = $i; + for ($i = 0; $i < 64; $i++) $options[$i] = $i; foreach ($options as $key => $value) { echo '