Hi.
Sylverant.net has this nice sidebar that displays how many players are online on Sylverant. Is there a way to display this number on another website?
Displaying how many players are online on Sylverant
Moderators: BlueCrab, Aleron Ives
- Maturion
- Moderator
- Posts: 619
- https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
- Joined: Fri Oct 12, 2007 1:52 pm
- Location: Munich, Germany
- Has thanked: 0
- Been thanked: 0
- Contact:
- Aleron Ives
- DCEmu Nutter
- Posts: 872
- Joined: Wed Jan 05, 2011 2:15 pm
- Location: California
- Has thanked: 0
- Been thanked: 25 times
- Contact:
- BlueCrab
- The Crabby Overlord
- Posts: 5666
- Joined: Mon May 27, 2002 11:31 am
- Location: Sailing the Skies of Arcadia
- Has thanked: 9 times
- Been thanked: 69 times
- Contact:
Re: Displaying how many players are online on Sylverant
Code: Select all
<?php
$status = file_get_contents("http://sylverant.net/status.php");
echo $status;
?>
-
- DCEmu Freak
- Posts: 81
- Joined: Fri Jul 27, 2007 2:23 am
- Has thanked: 2 times
- Been thanked: 4 times
Re: Displaying how many players are online on Sylverant
It's not structured nicely for implementing it into a custom layout, though . Maybe have either a separate status.php like status_xml.php that gives the status in a parsed format like XML or heck, even URL encoded.
- BlueCrab
- The Crabby Overlord
- Posts: 5666
- Joined: Mon May 27, 2002 11:31 am
- Location: Sailing the Skies of Arcadia
- Has thanked: 9 times
- Been thanked: 69 times
- Contact:
Re: Displaying how many players are online on Sylverant
Its basically just plain text (with the exception of the br and strong tags in it). I don't really see how its very hard to integrate into a custom layout (I'm not referring to any of the Sylverant CSS stuff, anyway).
But it wasn't really ever designed to go into any custom layouts. It just so happens that people have used it as such.
I may make it into something else at some point in the future with XML or JSON or something like that, but its not really a priority at the moment. Both XML and JSON would be nicer for the data, but of course would require parsing and then laying out the data. Since I only really designed the status.php for my own use, I didn't really see a point in doing extra parsing work.
But it wasn't really ever designed to go into any custom layouts. It just so happens that people have used it as such.
I may make it into something else at some point in the future with XML or JSON or something like that, but its not really a priority at the moment. Both XML and JSON would be nicer for the data, but of course would require parsing and then laying out the data. Since I only really designed the status.php for my own use, I didn't really see a point in doing extra parsing work.