require_once 'prepend.inc';
$current = "3.0.18";
$win32_current = "3.0.17";
#$rpm_current = "3.0.5-1";
$filesizes["php-${current}.tar.gz"]="2,220 kB";
$filesizes["php-${win32_current}-win32.zip"]="1,895 kB";
#$filesizes["mod_php3-${rpm_current}.i386.rpm"]="294 kB";
#$filesizes["mod_php3-${rpm_current}.src.rpm"]="1,503 kB";
function makeCap() {
GLOBAL $MIRRORS, $COUNTRIES,$PHP_SELF,$MYSITE;
global $showcountry,$showsites,$csel;
?>

|
if (!isset($csel)) {
$csel='';
$hostname=getenv("REMOTE_HOST");
$ipaddr=getenv("REMOTE_ADDR");
if ((!$hostname)||($hostname==$ipaddr)) {
$hostname=@gethostbyaddr($ipaddr);
echo "\n";
if ($hostname==$ipaddr) { $hostname=""; }
} else {
echo "\n";
}
if ($hostname) {
if (ereg('([a-zA-Z]+)$',$hostname,$reg)) {
$csel=$reg[0];
}
}
}
if ($COUNTRIES[$csel]) {
$showcountry=$csel;
} else {
$info=$MIRRORS[$MYSITE];
$showcountry=$info[0];
if (!$showcountry) {
$showcountry="us";
}
}
$mirror_sites=$MIRRORS;
$count=0;
$lastc="";
reset($mirror_sites);
while ($site = key($mirror_sites)) {
$info = $mirror_sites[$site];
next($mirror_sites);
$c = $info[0];
$cname=$COUNTRIES[$c];
if ($c==$showcountry) {
$showsites[]=$site;
}
if ($c == $lastc || $c == 'xx') {
continue;
}
$count++;
echo " ";
if ($count%5==0) {
echo " \n";
}
$lastc = $c;
}
?>
|

|

|

|
};
commonHeader("Download PHP Engine");
?>
Choose a country to download from:
(the closest has automagically been selected for you)
makeCap();
$thisurl=substr($PHP_SELF,1); /* strip leading slash */
$mirror_sites=$MIRRORS;
$lastcountry="xxxxx";
@reset($showsites);
while ($site = @current($showsites)) {
next($showsites);
$info = $mirror_sites[$site];
list($country, $location, $shortname, $companyurl, $show) = $info;
$cname=$COUNTRIES[$country];
if (!$show) {
continue;
}
if (eregi("^http://",$site)) {
$method="HTTP";
$srcdir="distributions/";
} elseif (eregi("^ftp://",$site)) {
$method="FTP";
$srcdir="";
} else {
$method="unknown";
}
if ($lastcountry!=$country) {
echo "
|
|
|
\n";
echo "\n";
echo " | \n";
echo "
| \n";
echo "";
echo "$COUNTRIES[$country]
| \n";
echo "
| \n";
echo "
\n";
$lastcountry=$country;
}
echo "";
spc(75,1);
echo "
| \n";
echo "\n";
echo "\n";
if ((!isset($lastlocation))||($lastlocation!=$location)) {
echo("$location \n");
$lastlocation=$location;
}
echo "\n";
$src_file = "${site}${srcdir}php-${current}.tar.gz";
$win32_zfile = "${site}${srcdir}php-${win32_current}-win32.zip";
# $i386_rpm = "${site}${srcdir}mod_php3-${rpm_current}.i386.rpm";
# $src_rpm = "${site}${srcdir}mod_php3-${rpm_current}.src.rpm";
if (eregi("caraveo",$site)) { # special case ;-)
echo("- ");
download_link("${site}/php3latest.zip","Latest patched Windows version");
echo "\n";
} else {
echo "
- ";
download_link($src_file, "($method) PHP $current source");
echo "\n";
echo "
- ";
download_link($win32_zfile, "($method) $win32_current Win32 binary");
echo "\n";
# echo "
- ";
# download_link($src_rpm, "($method) PHP $rpm_current source RPM");
# echo "\n";
}
echo("
\n | |
\n");
}
?>
|
|
|
 |

|
commonFooter();
?>