Displaying how many players are online on Sylverant

Sylverant is a homebrew open source server for Phantasy Star Online. Dreamcast users still play PSO online with this server even today! This is the official forum for both the online game server as well as the open source project itself. Feel free to post and get a gathering started online! We can also show you how to get connected!

Moderators: BlueCrab, Aleron Ives

Post Reply
User avatar
Maturion
Moderator
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:

Displaying how many players are online on Sylverant

Post by Maturion »

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?
User avatar
Aleron Ives
DCEmu Nutter
DCEmu Nutter
Posts: 870
Joined: Wed Jan 05, 2011 2:15 pm
Location: California
Has thanked: 0
Been thanked: 25 times
Contact:

Re: Displaying how many players are online on Sylverant

Post by Aleron Ives »

"Fear the HUnewearl."
Image
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5652
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

Post by BlueCrab »

Code: Select all

<?php
$status = file_get_contents("http://sylverant.net/status.php");
echo $status;
?>
If you're using PHP, that is.
Dreamcast
DCEmu Freak
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

Post by Dreamcast »

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.
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5652
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

Post by BlueCrab »

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. :wink:

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.
Post Reply