cvs: php-master-web /fetch mirrordns.php

From: Date: Mon, 16 Dec 2002 21:29:47 +0000
Subject: cvs: php-master-web /fetch mirrordns.php
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-14269@lists.php.net to get a copy of this message
goba Mon Dec 16 16:29:47 2002 EDT Modified files: /php-master-web/fetch mirrordns.php Log: Ups, regardless of what was my intention, we still have mirrors with non-standard names, and they should not end up in the DNS output. Index: php-master-web/fetch/mirrordns.php diff -u php-master-web/fetch/mirrordns.php:1.2 php-master-web/fetch/mirrordns.php:1.3 --- php-master-web/fetch/mirrordns.php:1.2 Mon Dec 16 16:00:55 2002 +++ php-master-web/fetch/mirrordns.php Mon Dec 16 16:29:46 2002 @@ -21,8 +21,12 @@ // Go through all mirrors while ($row = @mysql_fetch_array($res)) { - // If the mirror is not a standard one, skip it - if ($row['mirrortype'] != 1) { continue; } + // If the mirror is not a standard one, or + // it's name is not a standard mirror name + // under php.net => skip it + if ($row['mirrortype'] != 1 || !preg_match("!^\\w{2}\\d?.php.net$!", $row['hostname']) { + continue; + } // The CNAME is an IP if (preg_match("!^\\d+\\.\\d+\\.\\d+\\.\\d+$!", $row['cname'])) {

« previous php.mirrors (#14269) next »