as-stats-gui/lib/json/get_ixname.php
Nicolas Debrigode 550a499c66 Release 0.2
Added a page to view ASN stats on an IX (by API PeeringDB).
Rebuilding the page that displays the stats of an AS-SET.
Big cleanup on unused files.
2017-07-13 15:08:59 +02:00

18 lines
379 B
PHP

<?php
require_once("../class/peeringdb.php");
$peer = new PeeringDB();
$return = NULL;
if ( isset($_GET['name']) ) {
foreach ($peer->GetIXName($_GET['name']) as $key => $value) {
$return[] = array (
'id' => strval($value->id),
'name' => strval($value->name) . " (".$value->city." / ".$value->country.")",
);
}
print_r(json_encode($return));
}
?>