Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / How to show your server is running on Website

Author
Message
SageTech
20
Years of Service
User Offline
Joined: 3rd Dec 2004
Location: Orlando, Florida
Posted: 14th Jan 2005 10:48 Edited at: 14th Jan 2005 10:55
Hello, I am currently developing a game (im sure you know that) and are doing server tests all the time for my game. I would like to post when my server is online/offline on my website, does anyone know how to do this? Answers Apriecieated.

And Please, No Spamming

~~~~Sage Tech Administrator~~~~

Sage Tech Manager
JoelJ
21
Years of Service
User Offline
Joined: 8th Sep 2003
Location: UTAH
Posted: 14th Jan 2005 12:21
ping?
pong!

learn some Dynamic web building

like PHP, ASP, Perl, something like that.

[center]
I like cheese
ZtEaLmAx
20
Years of Service
User Offline
Joined: 4th Dec 2004
Location: Sweden
Posted: 14th Jan 2005 16:30 Edited at: 14th Jan 2005 18:50
If you are running the webserver on the same machine as you game server you could do something simple for example:

When you start game server generate htm file:


then when server closing down:

Then just call "status.htm" in your websites template
for example:

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:


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]

Attachments

Login to view attachments
SageTech
20
Years of Service
User Offline
Joined: 3rd Dec 2004
Location: Orlando, Florida
Posted: 14th Jan 2005 23:41
Well, im using aol so my website is hosted by aol, hence why at the begeining it says members.aol.com. THanks for the codes though, should proove usefull thank you.

Sage Tech Manager
ZtEaLmAx
20
Years of Service
User Offline
Joined: 4th Dec 2004
Location: Sweden
Posted: 15th Jan 2005 02:04 Edited at: 15th Jan 2005 02:07
OKi hmm, is it possible to ftp to an aol account? just wondering


Quote of the week: These humans i like, they are greedy! - Quark (DS9) - [href]www.darkbasicpro.tk[/href]
Final Epsilon
21
Years of Service
User Offline
Joined: 26th Jan 2004
Location: CA, USA
Posted: 15th Jan 2005 02:27 Edited at: 15th Jan 2005 02:29
instead of ftping an entire html file to your webserver, wouldn't it be more efficient to FTP a small txt file with server information, and have a php script parse it and display the results on your page?

It would be a bit quicker.
Final Epsilon
21
Years of Service
User Offline
Joined: 26th Jan 2004
Location: CA, USA
Posted: 15th Jan 2005 02:39 Edited at: 15th Jan 2005 02:49
Actually, I just remembered another, faster way.

While working on the CHRBBB demo, we created a very simple, but effective lobby server. What we did was have a DBP program call a php script, and add the game.

ie:
Quote: "http://www.chaoticvoid.com/~chrbbb/alerante/?action=add&name=gamename&username=username&comment=comment"


and to retrieve the list of current games, we would have DBP download the file
Quote: "http://www.chaoticvoid.com/~chrbbb/alerante/main"

and parse it for current games.

Deleting games was rather simple, as all we did was call the script again, except with a delete command.
Quote: "http://www.chaoticvoid.com/~chrbbb/alerante/?action=delete&name=gamename"



Though, if you just want to show that your game is online, you don't need to do as many steps. Just use DBP to send a post request to your php script, and have the script display your server is online. When your server goes down, just have it call the php script again.

I find this to be much faster than connecting via ftp.

note: I'm going to use quotes, cuz codeboxes don't show up right in my copy of firefox, and it's annoying.
ZtEaLmAx
20
Years of Service
User Offline
Joined: 4th Dec 2004
Location: Sweden
Posted: 15th Jan 2005 02:45 Edited at: 15th Jan 2005 02:51
Final Epsilon in essence the html file is an text file with information but i get your point.

All cant run PHP especialy if they use free webservices as aol etc, and they just dont want to get in to new programing like php, and often just stay with simple html...
But if they do they should use your example. Probebly faster

Quote: "instead of ftping an entire html file to your webserver, wouldn't it be more efficient to FTP a small txt file with server information, and have a php script parse it and display the results on your page?
"


an html file with my tags "online" "offline" is the same "SMALL" size as an ordinary .txt file


Quote of the week: These humans i like, they are greedy! - Quark (DS9) - [href]www.darkbasicpro.tk[/href]
Final Epsilon
21
Years of Service
User Offline
Joined: 26th Jan 2004
Location: CA, USA
Posted: 15th Jan 2005 02:51 Edited at: 15th Jan 2005 02:53
meh. I was just showing there are some alternatives to using FTP.

And with html, you have to send extra data, such as tags.

Besides... a simple script like that wouldn't take up much bandwidth.
I wouldn't mind hosting one for someone if they want.
ZtEaLmAx
20
Years of Service
User Offline
Joined: 4th Dec 2004
Location: Sweden
Posted: 15th Jan 2005 02:52 Edited at: 15th Jan 2005 02:54
That would be cool

Yea i liked your example verry much

Time for me to put on some coffee
and get back to programing my FPS game...


Quote of the week: These humans i like, they are greedy! - Quark (DS9) - [href]www.darkbasicpro.tk[/href]
Final Epsilon
21
Years of Service
User Offline
Joined: 26th Jan 2004
Location: CA, USA
Posted: 15th Jan 2005 02:59
Quote: "an html file with my tags "online" "offline" is the same "SMALL" size as an ordinary .txt file"



Not if you were to upload a completely blank file, with only a filename of either
"1" for online or
"0" for offline.

That's much smaller than your tags.

Though, truthfully, if he's running a server on a powerful internet connection, the few bytes of data from all these optimizations aren't going to help, as he only sends one file when he's online, and one when he's offline.

However, if he wanted to do something, such as list all the players currently online every 5 minutes, using the php script method might be better than FTP.
ZtEaLmAx
20
Years of Service
User Offline
Joined: 4th Dec 2004
Location: Sweden
Posted: 15th Jan 2005 03:04 Edited at: 15th Jan 2005 03:11
Yea your right
I like it how they have done when using "E107" plugin for gameservers
but offcource that access the game engine directly towords the cstrike servers IP...

http://e107.org/news.php

Hmm i wonder how i can incorporate something like that into my gamecode... would be nice to have

-information of that plugin ...



Quote of the week: These humans i like, they are greedy! - Quark (DS9) - [href]www.darkbasicpro.tk[/href]
SageTech
20
Years of Service
User Offline
Joined: 3rd Dec 2004
Location: Orlando, Florida
Posted: 15th Jan 2005 03:55
well i dont know any fancy stuff to do with web page design bicise html, and a little pearl, ive been working on learning java too, but thats it

Sage Tech Manager
Grizzly Netch
20
Years of Service
User Offline
Joined: 11th Nov 2004
Location:
Posted: 16th Jan 2005 10:58
Did you run the server? I need to know if TCP/IP protocols are working! Is possible to connect to your server with the Dark Basic pro program??? Please answer me on [email protected]
Thanks a lot!!!
Final Epsilon
21
Years of Service
User Offline
Joined: 26th Jan 2004
Location: CA, USA
Posted: 16th Jan 2005 12:00
it's possible to connect to a server. Use exeat or cynbernetic wraith's winsock plugin.

I've written a simple chat program using a C# server before, so i know it works. ^_^
SageTech
20
Years of Service
User Offline
Joined: 3rd Dec 2004
Location: Orlando, Florida
Posted: 16th Jan 2005 14:18 Edited at: 16th Jan 2005 14:20
is c# relative to visual c?

Sage Tech Manager
Eiolon
20
Years of Service
User Offline
Joined: 17th Jan 2005
Location:
Posted: 17th Jan 2005 10:53
If you have access to PHP, just create a new file called "status.php" or whatever and insert the following code:

Login to post a reply

Server time is: 2025-05-28 04:05:27
Your offset time is: 2025-05-28 04:05:27