( search forums )
- Server Info PHP Script - Link fixed -
Soldat Forums - Soldat Fans - Fan Apps
mar77a
October 23, 2004, 4:07 am
Server Information PHP Script - by ARG| Black Dog
History:

Updated 14/12/04:

*Added:
-Team scores display efficiently
-$showteamscores varaible added

*Fixed:
-$limit autmatically detects
-Minor bugs

*Soon:
-Check status of the server efficiently?

Updated 14/12/04:

*Added:
-$limitmanually till i fix that
-More powerfull $_errordisplay

*Fixed:
-Some major bugs
-More bugs

*Soon:
-Check status of the server efficiently?
-$limit variable fully working?

Updated 13/12/04:

*Added:
-$startline automatically
-Team colors on Currently Playing

*Fixed:
-Some minor bugs

Updated 12/12/04:

*Added
-Who's Online
-Players kills/deaths/team/ping
-Map Rotation
-All Weapons

*Fixed:
-Some minor bugs
-Spelling mistakes
-Some weapons not recog.
-Coding errors

*Soon (if you request it):
...(suggest)...

Updated 11/12/04:

*Added
-$checkfsockopen variable: fsockopen() sucks, so i included this function as an option.
-$display variable: error_reporting() now as a setting for script issues, bugs or problems.
-Check for the config.php [file_exists()]


*Fixed:
-Some minor bugs
-Spelling mistakes

*Soon (if you request it):
-Who is playing?
-Players online kills/deaths/team/ping?
-Admin online?

The Script:

*Files contained in the zip:
-config.php //Configuration file.
-engine.php //All the rough work (dont edit if you dont know what you´re doing).
-index.php //The main file that displays the info.
-style.css //Stylesheet CSS.

*Requirements:
-Webserver with PHP.
-Gamestat.txt accesible from internet(optional).

*Instructions:
-Configure the variables in the file config.php
-Upload all the files to your webserver.
-Run the file index.php

| DEMO2 | [url="http://ww2.u13.net/host/arg/misc/infoserver.zip">DOWNLOAD |
FAQ:

1) My server always appears as offline!
A: Change the variable $checkfsockopen to Zero in the config.php file.

2) How can I make the file gamestat.txt accesible from Internet?
A: Set up a HTTP Webserver on your computer. Eg: Easy Host Sharing Files Server

3) I get nothing shown on the screen, but no errors!
A: Turn on $errordisplay on the file config.php

4) Can i removed the credits?
A: Sure, but i would appreciate i you don´t.

6) I get an error: "404: Page not found"!
A: Make sure you downloaded the script and that you are in the correct folder/file. XD

7) Where can i contact you?
A: At MSN, jmartty@hotmail.com

SUGGEST FEATURES!

ENJOY!

Da cHeeSeMaN
October 23, 2004, 11:24 am
r u guys gonna release sumthing like wat u13 does so all servers will have things like that? if not tell me cos then im gonna *try* n' make mah own

robomaeyhem
October 31, 2004, 10:48 pm
Not Found
The requested URL /soldat/server/index.php was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Apache/1.3.31 Server at www.freepgs.com Port 80

mar77a
December 10, 2004, 3:47 pm
UPDATED!

eagleclaw364
December 10, 2004, 8:04 pm
Hey, that looks pretty neat! I might just download that! hehe

[EDIT]
Well it sort of works, but it always says the server is offline. How do I make this work?

mar77a
December 10, 2004, 10:15 pm
Did you configure correctly the config.php ?

SERIAL KILLeR
December 10, 2004, 10:25 pm
I had that to.
U have to make shure the ip and port are correcct in the config file.

mar77a
December 10, 2004, 10:26 pm
"I had that." What does that mean?

sTo0z
December 11, 2004, 2:06 am
Your script succesfully reports Online/Offline but that is it, it does not report any server .ini information.

What is the proper method for pointing to the .ini file? I made a copy and put it in the same folder as your scripts, but that didn't work apparently.

What is the proper way point to it?

EDIT: Oops, I forgot to edit the gamestat.txt field. Now I have that properly recorded everything is now showing up.

But I am getting the following when I load the page:
quote:Notice: Undefined offset: 6 in c:\Inetpub\wwwroot\info\engine.php on line 24

Notice: Undefined offset: 7 in c:\Inetpub\wwwroot\info\engine.php on line 25

Notice: Undefined offset: 8 in c:\Inetpub\wwwroot\info\engine.php on line 26

EDIT 2: Heh, ok, I noticed those were team oriented lines, so I edited them out, all is well now it looks like.

Awesome scripts guy. :)

EDIT 3: Fixed "guys" to "guy" ;)

mar77a
December 11, 2004, 3:07 am
Okey, im glad it worked...



PD: Where can I see this?
PD2: no "guys", its just me :)

sTo0z
December 11, 2004, 5:06 am
Well my server is just a fun little arena for my friends, but here is the site so you can see your glory in action. :)

http://stoozserv.hopto.org

eagleclaw364
December 11, 2004, 10:00 am
I have the config correctly modified. Please help :(
And of course the IP and port are right.

mar77a
December 11, 2004, 1:24 pm
I will soon release a new version that will help you eagleclaw, dont worry

eagleclaw364
December 11, 2004, 1:41 pm
Ok thanks, any idea when?

sTo0z
December 11, 2004, 1:43 pm
Hm... My server is still up but the script reports it down.. wierd. It was working so good, not sure what happened?

A restart of the server got the script going again, wonder why it stopped picking it up?

eagleclaw364
December 11, 2004, 1:48 pm
stooz, may i see your config file to see what's wronng with mine?

mar77a
December 11, 2004, 2:44 pm
The new version is released eagleclaw, there you can fix your problem, by setting the variable $checkfsockopen to ZERO in the config.php file

sTo0z
December 11, 2004, 3:14 pm
Here's mine. Nothing special. Hope it helps
quote:<?

//Server Configuration

$serverip = "stoozserv.hopto.org"; //Server´s ip

$serverport = "23073"; //Server´s port

$serverini = "C:\soldatserver221\soldat.ini"; //Location of the servers soldat.ini

$serverlog = "C:\soldatserver221\logs\gamestat.txt"; //Place where the gamestat.txt is located...

$serveradmin = "Stooz"; //The admin of the Server

$adminmail = "stoozoftown@gmail.com"; //The admin´s e-mail

?>

mar77a
December 11, 2004, 3:44 pm
Where are "these" hosted:?

$serverini = "C:\soldatserver221\soldat.ini"; //Location of the servers soldat.ini

$serverlog = "C:\soldatserver221\logs\gamestat.txt"; //Place where the gamestat.txt is located...

Weird?

sTo0z
December 11, 2004, 4:59 pm
Was I not supposed to do it that way? :P

That's just where on my C: drive on the server those files happen to be.


eagleclaw364
December 11, 2004, 5:33 pm
but if you have to host those files then you have to like constantly upload them?

[EDIT] I tried out the new version and now it says N/A...

http://legion.gibbering.net/eagle/serverinfo/index.php

that's where it says the stuffs

mar77a
December 11, 2004, 6:04 pm
The server folder should be accesible from internet...you have to get a webserver running on your computer...

eagleclaw364
December 11, 2004, 6:05 pm
poo, I can't :( , unless I run my soldat server FROM the server I host it on... lol

sTo0z
December 11, 2004, 6:55 pm
That's what I do. :P

mar - The script did it again, my server is still up, but for some reason, it thinks it isn't.

It runs ok for awhile, not sure when or why it stops reporting correctly. :
EDIT: Ok mar, lil' update. Apparently the script is still running fine... And the server is still running, but for some odd reason no one can connect. Which is obviously why the script is reporting it's down.

So something is wrong with the server, not the script. :)

Now I have to figure out how in the heck the server is still running but not accepting connections. :\

eagleclaw364
December 11, 2004, 6:59 pm
Lol! You uploaded the server to your host and run it off there? I'm in the process of uploading xD

sTo0z
December 11, 2004, 7:03 pm
quote:Originally posted by eagleclaw364Lol! You uploaded the server to your host and run it off there? I'm in the process of uploading xD
Well, I host everything from home so... :P

Not sure what your situation is, but I don't think you'lll be able to upload your game to your web host and run it.

mar77a
December 11, 2004, 7:21 pm
You have to have SHELL execution...

eagleclaw364
December 11, 2004, 9:45 pm
...what?

[EDIT] mar77a, couldn't you like make the PHP script download the soldat.ini or the gamestat.txt from the server? Cause then we wouldn't have to have a webhost : )

mar77a
December 12, 2004, 3:52 pm
The soldat.ini can be upload it because it doesnt auto-update...

About that script...i dunno...if its possible...cause soldat opens port 23073, not 80...

eagleclaw364
December 12, 2004, 4:00 pm
FLAB said he would do something like this. I really am stumped on what to do :( Im trying to make an FTP server. Would this help?

mar77a
December 12, 2004, 5:54 pm
you dont need an FTP server, you need a webserver, HTTP...
The best is Apache. Everyone uses it...visit the website at http://httpd.apache.org/ ...

eagleclaw364
December 12, 2004, 9:19 pm
OK /me downloads apache, but I gotta set it up :S

mar77a
December 12, 2004, 10:43 pm
Contact FliesLikeABrick, he is an expert in that stuff...

mar77a
December 13, 2004, 4:30 pm
I found another webserver... Easy Host File Sharing... visit the webpage here... http://www.sharing-file.com

eagleclaw364
December 13, 2004, 4:48 pm
Hmm, ok is it easy to set up?

FliesLikeABrick
December 13, 2004, 7:06 pm
the webserver i used before creating higher traffic sites was Xitami at www.imatix.com It would be fine to use for something like this, but it becomes unstable with high volumes of traffic on pages containing complex scripts.

Edit: oh yeah, and the whole point (which i forgot to mention) is that it is very easy to install and use

mar77a
December 13, 2004, 8:01 pm
I doubt is easiear than this one... http://www.sharing-file.com ....
I downlaod it, pressed Start, tested, worked perfectly....its like...perfect and simple...but extremly simple...

eagleclaw364
December 13, 2004, 8:28 pm
but it costs money :(

mar77a
December 13, 2004, 8:33 pm
Noo!! Downlaod it for free here...

Download EFFS

eagleclaw364
December 13, 2004, 9:33 pm
yes but its only a 15 day trial >=[

sTo0z
December 14, 2004, 3:13 am
mar77a,

I am attempting to use your new script but the format comes out all wrong and things are not being reported correctly.

Take a look when you get a chance, thanks:
http://stoozserv.hopto.org

EDIT:

If I leave fsockopen as 0, my server reports as N/A.

If I turn it to 1, it says offline and everything gets a little buggy.

Didn't have a problem with seeing my server status correctly with your previous script, lemme know if you see anything obvious or need more info. :)

mar77a
December 14, 2004, 12:21 pm
I´ll tell you, the fsockopen() function that is used when turned to 1, sucks badly. Dont even try it. Im going to make a different method to recognise if the server is online or offline. Im working on it...

sTo0z
December 15, 2004, 12:56 am
mar,

I'm not certain, but it would appear if a server is in deathmatch, the script reads the teamdeathmatch value for the limit variable.

I have my DM limit set to 30, and TDM set to 60. The server info reports mode: DM and Limit: 60.

I changed my TDM limit to 30 and now reports at 30. :P

mar77a
December 15, 2004, 2:11 am
I´ll fix that NOW!

Thanks for reporting bugs!

EDIT: Fixed, re-download and replace index.php

Deleted User
December 15, 2004, 6:41 am
Woulda been a hell of a lot easier in Python :-P and a lot less code to worry about :-P

mar77a
December 15, 2004, 12:07 pm
But, my webhost doesn't support Python, i dont know Python and what teh is Python? The snake ? hhhahaha

PS: I know what Python is but i preffer PHP

FliesLikeABrick
December 19, 2004, 1:51 am
why'd you bother putting all the code on here? if anyone wanted to see it they could just download it and look.

mar77a
December 19, 2004, 1:59 am
Yeah, lol, i will remove it...

super_ik
December 28, 2004, 9:31 am
isn't it a bit dangerous to put your soldat.ini on the internet. everone can see the passwords in this file now. :s

mar77a
January 17, 2005, 1:25 am
Well, the soldat.ini is supposed to be hidden...