ID:269022
 
I think there was a post on it long before i can remember but


I was wondering on a PHP site is there a way to make it say if your byond game is online or offline?


So when people enter my site is it possible for me to make it show if my game is hosted or not being hosted?
Forum Search is your friend.
Flame Sage just asked a question like this a few days ago, I think.
In response to Hell Ramen
Ive been serching for the PAST HOUR
In response to Hell Ramen
Hmm, is this what you are talking about [link]
In response to N1ghtW1ng
No.
In response to Smoko
Thanks Alot
In response to Dranzer_Solo
<?php
$gamelive=true;
$SERVER_ADDRESS="127.0.0.1";
$SERVER_PORT=5000
$TIMEOUT=3 //seconds before timiming out attempt
if($gamelive==true){
$check = pfsockopen ($SERVER_ADDRESS, $SERVER_PORT, &$errno, &$errstr, 5);
if (!$check) {
echo "<font color=\"#FF0000\>offline </font>";

} else {
echo "<font color=\"#00FF00\">online</font>";
fclose($fp);
};
};?>


-_- do i put that in a byond file or a php file?
In response to Dranzer_Solo
Im guessing a PHP file.
In response to Dranzer_Solo
Er, the PHP file. That's completely obvious.

Do you even have a php host?
In response to Elation
yeh.....my forums are PHP and my website will be PHP
In response to Dranzer_Solo
He's asking if your host supports PHP.
In response to Smoko
Smoko wrote:
He's asking if your host supports PHP.

I presume it does.

Oh well.

Dranzer, php code will go in the php file.