Jestli nikdo nemáte nic proti, tak to +/- tento týden hodím na server a předělám odkazy.
Url takhle:
rel.php?lts=0&arch=i386&var=desktop&desktop=unity - 32 bit Ubuntu Release (14.10)
rel.php?lts=1&arch=amd64&var=desktop&desktop=kde - 64 bit Kubuntu Lts
rel.php?lts=1&arch=amd64&var=server - 64 bit Server
rel.php?lts=1&arch=amd64&var=mini - 64 bit mini iso
<?php
$latest = "14.10"; // posledni release
$latest_lts = "14.04.1"; // posledni lts (ve tvaru x.y nebo x.y.z)
// pole vydani - vzdy lts a posledni release
$codes = array("14.04.1" => "trusty", "14.10" => "utopic");
// GET parametry
$lts = $_GET['lts']; // 1 nebo 0
$arch = $_GET['arch']; // i386 nebo amd64
$var = $_GET['var']; // desktop, server, mini
$desktop = $_GET['desktop']; // prostredi - unity, edu, xfce, lxde, kde
if ($lts == 1)
{
$code = $codes[$latest_lts];
$ver = $latest_lts;
}
else
{
$code = $codes[$latest];
$ver = $latest;
}
if ($var == "desktop")
{
switch($desktop)
{
case "unity":
$redir = "http://releases.ubuntu.com/" . $code . "/" . "ubuntu-" . $ver . "-desktop-" . $arch . ".iso";
header("Location: $redir");
break;
case "edu":
$redir = "http://cdimage.ubuntu.com/edubuntu/releases/" . $code . "/release/edubuntu-" . $ver . "-dvd-" . $arch . ".iso";
header("Location: $redir");
break;
case "xfce":
$redir = "http://cdimage.ubuntu.com/xubuntu/releases/" . $code . "/release/xubuntu-" . $ver . "-desktop-" . $arch . ".iso";
header("Location: $redir");
break;
case "lxde":
$redir = "http://cdimage.ubuntu.com/lubuntu/releases/" . $code . "/release/lubuntu-" . $ver . "-desktop-" . $arch . ".iso";
header("Location: $redir");
break;
case "kde":
$redir = "http://cdimage.ubuntu.com/kubuntu/releases/" . $code . "/release/kubuntu-" . $ver . "-desktop-" . $arch . ".iso";
header("Location: $redir");
break;
case "gnome":
break;
case "mate":
break;
}
}
elseif ($var == "server")
{
$redir = "http://releases.ubuntu.com/" . $code . "/" . "ubuntu-" . $ver . "-" . $var . "-" . $arch . ".iso";
header("Location: $redir");
}
elseif ($var == "mini")
{
$redir = "http://archive.ubuntu.com/ubuntu/dists/" . $code . "/main/installer-" . $arch . "/current/images/netboot/mini.iso";
header("Location: $redir");
}
?>