<subtitle>IP Locations of Diaspora pods on podupti.me</subtitle>
<subtitle>IP Locations of Diaspora pods on podupti.me</subtitle>
<link href="http://podupti.me/"/>
<link href="http://podupti.me/"/>
...
@@ -25,7 +23,7 @@ EOF;
...
@@ -25,7 +23,7 @@ EOF;
$numrows=pg_num_rows($result);
$numrows=pg_num_rows($result);
while($row=pg_fetch_array($result)){
while($row=pg_fetch_array($result)){
$pod_name=htmlentities($row['name'],ENT_QUOTES);
$pod_name=htmlentities($row['name'],ENT_QUOTES);
$tip=sprintf(
$summary=sprintf(
'This pod %1$s has been watched for %2$s months and its average ping time is %3$s with uptime of %4$s%% this month and was last checked on %5$s. On a score of 100 this pod is a %6$s right now',
'This pod %1$s has been watched for %2$s months and its average ping time is %3$s with uptime of %4$s%% this month and was last checked on %5$s. On a score of 100 this pod is a %6$s right now',
$sql='SELECT id,domain,status,secure,score,userrating,adminrating,city,state,country,lat,long,ip,ipv6,pingdomurl,monthsmonitored,uptimelast7,responsetimelast7,local_posts,comment_counts,dateCreated,dateUpdated,dateLaststats,hidden FROM pods';
$sql='SELECT id,domain,status,secure,score,userrating,adminrating,city,state,country,lat,long,ip,ipv6,pingdomurl,monthsmonitored,uptimelast7,responsetimelast7,local_posts,comment_counts,dateCreated,dateUpdated,dateLaststats,hidden FROM pods';
$result=pg_query($dbh,$sql);
$result=pg_query($dbh,$sql);
$result||die('Error in SQL query: '.pg_last_error());
$result||die('Error in SQL query: '.pg_last_error());
"\n".'This pod %1$s has been watched for %2$s months and its average ping time is %3$s with uptime of %4$s%% this month and was last checked on %5$s. On a score of -20 to +20 this pod is a %6$s right now',
"\n".'This pod %1$s has been watched for %2$s months and its average ping time is %3$s with uptime of %4$s%% this month and was last checked on %5$s. On a score of -20 to +20 this pod is a %6$s right now',
echo'<td class="'.$classver.'"><div title="'.$pre.' codename: '.$row['longversion'].' master version is: '.$row['masterversion'].'" class="tipsy">'.$version.'</div></td>';
echo'<td class="'.$classver.'"><div title="'.$pre.' codename: '.$row['longversion'].' master version is: '.$row['masterversion'].'" class="tipsy">'.$version.'</div></td>';
$sql="SELECT * FROM pods WHERE adminrating <> -1 AND hidden <> 'yes' AND uptimelast7 > 95 AND masterversion = shortversion AND signup = 1 ORDER BY RANDOM() LIMIT 1";
$sql="SELECT * FROM pods WHERE adminrating <> -1 AND hidden <> 'yes' AND uptimelast7 > 95 AND masterversion = shortversion AND signup = 1 ORDER BY RANDOM() LIMIT 1";
$result=pg_query($dbh,$sql);
$result=pg_query($dbh,$sql);
$result||die('Error in SQL query1: '.pg_last_error());
$result||die('Error in SQL query: '.pg_last_error());
echo'<td data-toggle="tooltip" data-placement="bottom" title="active six months: '.$row['active_users_halfyear'].', active one month: '.$row['active_users_monthly'].'">'.$row['active_users_halfyear'].'</td>';
echo'<td data-toggle="tooltip" data-placement="bottom" title="active six months: '.$row['active_users_halfyear'].', active one month: '.$row['active_users_monthly'].'">'.$row['active_users_halfyear'].'</td>';
$tip.="\n This {$row['softwarename']} pod {$pod_name} has been watched for {$row['monthsmonitored']} months with an uptime of {$row['uptimelast7']}% this month and a response time average today of {$row['responsetimelast7']}ms was last checked on {$row['dateupdated']}. ";
$tip.="\n This {$row['softwarename']} pod {$pod_name} has been watched for {$row['monthsmonitored']} months with an uptime of {$row['uptimelast7']}% this month and a response time average today of {$row['responsetimelast7']}ms was last checked on {$row['dateupdated']}. ";
$tip.="On a scale of 100 this pod is a {$row['score']} right now";
$tip.="On a scale of 100 this pod is a {$row['score']} right now";