cvs: phpweb / downloads.php

From: Date: Thu, 16 May 2002 18:26:58 +0000
Subject: cvs: phpweb / downloads.php
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-10246@lists.php.net to get a copy of this message
goba Thu May 16 14:26:58 2002 EDT Modified files: /phpweb downloads.php Log: Try this mirror autodetection out ;) Let's see what I broke. Index: phpweb/downloads.php diff -u phpweb/downloads.php:1.99 phpweb/downloads.php:1.100 --- phpweb/downloads.php:1.99 Tue May 14 20:56:03 2002 +++ phpweb/downloads.php Thu May 16 14:26:56 2002 @@ -56,8 +56,22 @@ <h1>Latest version of PHP</h1> <p> -Before you download, make sure you are using a mirror close to you. You can -change mirrors at the bottom of the page. +Before you download, make sure you are using a mirror close to you. +<?php +$cm = find_closest_mirrors(); +$cmn = count($cm); +if ($cmn > 0) { + echo "We found "; + echo ($cmn > 1 ? "$cmn mirrors" : "a mirror"); + echo " near you. We recommend you use nearby mirror sites."; + echo "Please visit: "; + foreach ($cm as $num => $mirror) { + echo '<a href="' . $mirror . '">' . $mirror . '</a>'; + if ($num < $cmn) { echo " or "; } + } +} +?> +You can change also mirrors at the bottom of the page. </p> <h2>Complete Source Code</h2>

« previous php.mirrors (#10246) next »