First Commit
This commit is contained in:
1 parent
5eb9dd037d
commit
2e62c0e60b
11877 files changed
+2035312
No files matched your search
+31
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
include "db.php";
|
||||
|
||||
$query = "SELECT school_name, url FROM schools WHERE status IN ('Active','Linked','Special')";
|
||||
$schools = db_query($query);
|
||||
|
||||
$domains = array();
|
||||
|
||||
while ($row = db_fetch_assoc($schools)) {
|
||||
extract($row);
|
||||
list($code,$domain) = explode(".",$url,2);
|
||||
if (strpos($domain,'.') == 0) $domain = $url;
|
||||
if (strlen($domain) == 0) continue;
|
||||
|
||||
if (array_key_exists($domain,$domains)) {
|
||||
$domains[$domain]++;
|
||||
}
|
||||
else {
|
||||
$domains[$domain] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
ksort($domains);
|
||||
asort($domains,SORT_NUMERIC);
|
||||
|
||||
foreach ($domains AS $domain => $count) {
|
||||
printf("%-30s: %3d\n",$domain,$count);
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in new issue
Block a user