ID:184464
 
ok.. im working on this php script. but i know IT used to work and show the byond server as being online.. but now.. everytime i make it request a server thats on byond it just says offline. the ports are right and everything. Im trying to close my server. Im hoping some of you have some advice in php. Or know enough about byond and php to figure this out. Im hosting a server not making a game. please help if you know.

EDIT: OH by the way, it used to work using an older byond version.

THIS is PHP not DM

Current Server Status


<? printf ("
"); printf ("You can refresh the page by clicking the reload button on your browser or the text [refresh] below.
"); printf ("
[Refresh]

"); $site1 = "kato.bounceme.net"; $site1port= "4000"; $check1 = fsockopen($site1, $site1port); if ($check1) { echo "

"; } else { echo "
"; } ?>
SS13:($site1) is up.
SS13:($site1) is down.

In response to XzDoG
XzDoG wrote:
[link]

Hmm i hope this works, Thanks XzDoG.

Nope, Not what im looking for. I dont have the information and plus its buggy.
When switching to PHP parsing, make sure you are using the full tag <?php rather than just <?.

Otherwise I believe when I was doing this I had some issues using fsocketopen(), and ended up using pfsocketopen() ([link]).

[Edit]Also, you need to make sure to close the connection via fclose() which I believe is your problem here.[/edit]
Fusioneko wrote:
ok.. im working on this php script. but i know IT used to work and show the byond server as being online.. but now.. everytime i make it request a server thats on byond it just says offline. the ports are right and everything. Im trying to close my server. Im hoping some of you have some advice in php. Or know enough about byond and php to figure this out. Im hosting a server not making a game. please help if you know.

EDIT: OH by the way, it used to work using an older byond version.

THIS is PHP not DM
<head><title>Status Page</Title></Head><h1><center>Current Server Status</center></h1><table border=1><font face=Tahoma size=2 color=blue><?printf ("
<font face=Tahoma size=2 color=black>");printf ("You can refresh the page by clicking the reload button on your browser or the text [refresh] below.
");printf ("
[Refresh]

");$site1 = "kato.bounceme.net";$site1port= "4000";$check1 = fsockopen($site1, $site1port);if ($check1) {echo "<tr><TH ALIGN=LEFT><font face=Tahoma size=2> SS13:($site1) is <font color=green>up</font>.</tr>
";}else {echo "<tr><TH ALIGN=LEFT><font face=Tahoma size=2> SS13:($site1) is <font color=red>down</font>.</tr>
";}?></font></table>


Ian Gave me this script (Ian of hyberbyond) I had asked for it. and he gave it to me. IT used to work perfectly.. still no solutions.
In response to Fusioneko
Did the other script I posted about work?
In response to XzDoG
XzDoG wrote:
Did the other script I posted about work?

It works. but not what im looking for. Im looking for something to tell if one single server is offline or online.
In response to Fusioneko
Fusioneko wrote:
XzDoG wrote:
Did the other script I posted about work?

It works. but not what im looking for. Im looking for something to tell if one single server is offline or online.

[link], Specifically: "you need to make sure to close the connection via fclose()"