If you are running the webserver on the same machine as you game server you could do something simple for example:
rem starting game server
STARTUPSERVER:
status$="<img src="online.png"><B>ONLINE</B>"
delete file "status.htm"
open to write 1,"status.htm"
write string 1,status$
close file 1
rem shuting down game server
SHUTDOWNSERVER:
status$="<img src="offline.png"><B>OFFLINE</B>"
delete file "status.htm"
open to write 1,"status.htm"
write string 1,status$
close file 1
end
When you start game server generate htm file:
status$="ONLINE"
delete file "status.htm"
open to write 1,"status.htm"
write string 1,status$
close file 1
then when server closing down:
status$="OFFLINE"
delete file "status.htm"
open to write 1,"status.htm"
write string 1,status$
close file 1
Then just call "status.htm" in your websites template
for example:
<a href="status.htm">Game Server</a>
Its verry simple but usefull...
How ever if webserver is on other site try to do a FTP string
to auto upload file "status.htm" to your site shouldnt be a problem
like this:
` *** (C) 2005 ZTEALMAX - Server Status ***
` http://www.thegamecreators.com
rem Generate html for starting game server
STARTUPSERVER:
Print "Generate html for starting game server"
status$="<img src="online.png"><B>ONLINE</B>"
delete file "status.htm"
open to write 1,"status.htm"
write string 1,status$
close file 1
gosub accountinfo
rem Generate html for shuting down game server
SHUTDOWNSERVER:
Print "Generate html for shuting down game server"
status$="<img src="offline.png"><B>OFFLINE</B>"
delete file "status.htm"
open to write 1,"status.htm"
write string 1,status$
close file 1
gosub accountinfo
rem Reading your ftp account information
accountinfo:
print "Reading your ftp account information"
open to read 1, "account.txt"
read string 1, ftpurl$
read string 1, username$
read string 1, password$
read string 1, file$
gosub upload2ftp
rem uploading status file
upload2ftp:
print "uploading status file"
cls
ftp connect ftpurl$,username$,password$
ftp put file file$
set cursor 30,30
end
Upload files online.png & offline.png to your webserver (You find them in
[DOWNLOAD] button with the source.
You will need to modify it so it calls for the right thing in your code...BASIC but working
*** If you would like it to say witch players are online just add it
in the same way to the status.htm file Playname$ thingy!!! For exmple:
User connected Playername$ then open to write etc....***
I hope this is what you where after, if you have any questions
feel free to email me:[href]
[email protected][/href]
// Martin
i also put the code under code snippets

Quote of the week: These humans i like, they are greedy! - Quark (DS9) - [href]www.darkbasicpro.tk[/href]