Skip to content

Instantly share code, notes, and snippets.

@blha303
Created June 10, 2015 03:56
Show Gist options
  • Save blha303/0240d98ce0cdcc7661a9 to your computer and use it in GitHub Desktop.
Save blha303/0240d98ce0cdcc7661a9 to your computer and use it in GitHub Desktop.
Multiple server support for github.com/delan/lookout http://stats.blha303.biz
<?php
$servers = array("http://stats.home.blha303.biz", "http://stats.web.blha303.biz", "http://stats.ipv6.b303.me", "http://stats.irc.b303.me");
<html>
<head>
<link rel="icon" href="static/favicon.png">
<style>
body {
background: #202020;
color: #c0c0c0;
font-family: 'Segoe UI', sans-serif;
}
</style>
<title>Stats</title>
</head>
<body>
<a href="https://github.com/delan/lookout"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/38ef81f8aca64bb9a64448d0d70f1308ef5341ab/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png"></a>
<?php
include("config.php");
foreach ($servers as $server) { ?>
<iframe src="<?php echo $server ?>" width=600 height=400></iframe>
<?php } ?>
</body>
</html>
<?php
header("Content-Type: application/json");
include("../config.php");
echo "[" . PHP_EOL;
foreach ($servers as $server) {
echo " " . file_get_contents($server . "/raw") . "," . PHP_EOL;
}
echo "]";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment