We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 9624c1dc authored by elleo's avatar elleo

Add a simple display script to show some stats about the scrobble server

parent 15f96f81
<title>Libre.fm Scrobble Server</title>
<h1>Libre.fm Scrobble Server</h1>
<p>This site handles <em>scrobble</em> and <em>now playing</em> submissions from client applications and offers access to our web services API. If you just want to use <a href="http://libre.fm">libre.fm</a> then you probably want to visit the <a href="http://libre.fm">main site</a>, but if you're a developer then here are some useful stats to help you see what's happening.
<h2>Last 10 Scrobbles</h2>
$res = $mdb2->query("SELECT username, artist, track, time FROM Scrobbles ORDER BY time DESC LIMIT 10");
if(PEAR::isError($res)) {
while($row = $res->fetchRow(MDB2_FETCHMODE_ASSOC)) {
echo "<tr>";
foreach($row as $field => $value) {
if($field == "time") {
$value = strftime("%c", $value);
echo "<td>$value</td>";
echo "</tr>";
<h2>Now Playing?</h2>
<p><em>Coming soon</em></p>
......@@ -12,5 +12,8 @@ if (isset($_GET['hs']) && isset($_GET['p'])) {
} elseif (substr($_GET['p'], 0, 3) == "1.1") {
} else {
//If we're not handshaking then just display some nice stats
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment