Last active 1440822169

Multiple server support for github.com/delan/lookout http://stats.blha303.biz

Steven Smith revised this gist 1433908581. Go to revision

3 files changed, 31 insertions

config.php(file created)

@@ -0,0 +1,2 @@
1 + <?php
2 + $servers = array("http://stats.home.blha303.biz", "http://stats.web.blha303.biz", "http://stats.ipv6.b303.me", "http://stats.irc.b303.me");

index.php(file created)

@@ -0,0 +1,21 @@
1 + <html>
2 + <head>
3 + <link rel="icon" href="static/favicon.png">
4 + <style>
5 + body {
6 + background: #202020;
7 + color: #c0c0c0;
8 + font-family: 'Segoe UI', sans-serif;
9 + }
10 + </style>
11 + <title>Stats</title>
12 + </head>
13 + <body>
14 + <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>
15 + <?php
16 + include("config.php");
17 + foreach ($servers as $server) { ?>
18 + <iframe src="<?php echo $server ?>" width=600 height=400></iframe>
19 + <?php } ?>
20 + </body>
21 + </html>

raw.php(file created)

@@ -0,0 +1,8 @@
1 + <?php
2 + header("Content-Type: application/json");
3 + include("../config.php");
4 + echo "[" . PHP_EOL;
5 + foreach ($servers as $server) {
6 + echo " " . file_get_contents($server . "/raw") . "," . PHP_EOL;
7 + }
8 + echo "]";
Newer Older