Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » PHP Serverstatusbox
PHP Serverstatusbox [message #323408] Sat, 22 March 2008 19:21 Go to next message
SODPaddy is currently offline  SODPaddy
Messages: 233
Registered: August 2005
Location: Germany
Karma: 0
Recruit

Hello,

has someone the php code for the server status like on n00bstories website:

Renegade
Map: Volcano
Time Left: 0.20.43
Nod: 21/50 15268 points
GDI: 19/50 9293 points
SFPS: 59
- Players -


Website: www.Area54.eu

Once 54, Always 54.
(\__/)
(O.o )
(___)
Visit us at www.Area54.eu
Re: PHP Serverstatusbox [message #323438 is a reply to message #323408] Sat, 22 March 2008 22:31 Go to previous messageGo to next message
Ethenal is currently offline  Ethenal
Messages: 2532
Registered: January 2007
Location: US of A
Karma: 0
General (2 Stars)

That's custom coded by Crimson, it isn't available for download.

-TLS-DJ-EYE-K wrote on Mon, 18 March 2013 07:29

Instead of showing us that u aren't more inteligent than a Toast, maybe you should start becomming good in renegade Thumbs Up

Re: PHP Serverstatusbox [message #323462 is a reply to message #323408] Sun, 23 March 2008 04:15 Go to previous messageGo to next message
Gen_Blacky is currently offline  Gen_Blacky
Messages: 3250
Registered: September 2006
Karma: 1
General (3 Stars)
many server have that not very new

http://s18.postimage.org/jc6qbn4k9/bricks3.png
Re: PHP Serverstatusbox [message #323469 is a reply to message #323408] Sun, 23 March 2008 05:21 Go to previous messageGo to next message
SODPaddy is currently offline  SODPaddy
Messages: 233
Registered: August 2005
Location: Germany
Karma: 0
Recruit

i has only

http://ehserv.netgamezone.de/mserver/reserverstatus1.php

but i dont like :/


Website: www.Area54.eu

Once 54, Always 54.
(\__/)
(O.o )
(___)
Visit us at www.Area54.eu
Re: PHP Serverstatusbox [message #323475 is a reply to message #323408] Sun, 23 March 2008 06:30 Go to previous messageGo to next message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma: 0
General (5 Stars)
http://new.brenbot.com/projectDetails.php?projectID=9&OS=w

Allows BRenBot to upload server status to an FTP site in .txt format, which can then be parsed by your PHP code. Update interval is set in the XML file.


http://steamsignature.com/card/1/76561197975867233.png
Re: PHP Serverstatusbox [message #323480 is a reply to message #323408] Sun, 23 March 2008 08:47 Go to previous messageGo to next message
SODPaddy is currently offline  SODPaddy
Messages: 233
Registered: August 2005
Location: Germany
Karma: 0
Recruit

okay thanks... i try to test it

Website: www.Area54.eu

Once 54, Always 54.
(\__/)
(O.o )
(___)
Visit us at www.Area54.eu
Re: PHP Serverstatusbox [message #323482 is a reply to message #323408] Sun, 23 March 2008 08:54 Go to previous messageGo to next message
SODPaddy is currently offline  SODPaddy
Messages: 233
Registered: August 2005
Location: Germany
Karma: 0
Recruit

WOL
C&C_Field.mix
0
0
0
0
40
1193046.27.16 <- the time show this (its a marathon server)
60

http://www.eh-server.com/serverstatus/fdsstatus.txt

some more question how many seconds that plugin refresh?


Website: www.Area54.eu

Once 54, Always 54.
(\__/)
(O.o )
(___)
Visit us at www.Area54.eu

[Updated on: Sun, 23 March 2008 08:55]

Report message to a moderator

Re: PHP Serverstatusbox [message #323484 is a reply to message #323408] Sun, 23 March 2008 08:59 Go to previous messageGo to next message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma: 0
General (3 Stars)
He told you that the update interval is set in the xml file. You must of over-looked that Razz


Re: PHP Serverstatusbox [message #323486 is a reply to message #323408] Sun, 23 March 2008 09:03 Go to previous messageGo to next message
SODPaddy is currently offline  SODPaddy
Messages: 233
Registered: August 2005
Location: Germany
Karma: 0
Recruit

meH Razz okay im lookin over it Very Happy

Website: www.Area54.eu

Once 54, Always 54.
(\__/)
(O.o )
(___)
Visit us at www.Area54.eu
Re: PHP Serverstatusbox [message #323490 is a reply to message #323408] Sun, 23 March 2008 09:16 Go to previous messageGo to next message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma: 0
General (5 Stars)
I guess the plugin does not understand that the time might be 0 for a matathon server, but since you don't need to show the time for the marathon server you can just skip over that line with your php parsing.

http://steamsignature.com/card/1/76561197975867233.png
Re: PHP Serverstatusbox [message #323495 is a reply to message #323408] Sun, 23 March 2008 09:46 Go to previous messageGo to next message
SODPaddy is currently offline  SODPaddy
Messages: 233
Registered: August 2005
Location: Germany
Karma: 0
Recruit

what means the 4 zeros

0
0
0
0


Website: www.Area54.eu

Once 54, Always 54.
(\__/)
(O.o )
(___)
Visit us at www.Area54.eu
Re: PHP Serverstatusbox [message #323501 is a reply to message #323408] Sun, 23 March 2008 10:14 Go to previous messageGo to next message
pe21789 is currently offline  pe21789
Messages: 65
Registered: January 2007
Location: Germany
Karma: 0
Recruit
0 GDI Players
0 GDI Points
0 NOD Players
0 NOD Points


http://pepe.strikeportal.de/transformers.png
Re: PHP Serverstatusbox [message #323524 is a reply to message #323408] Sun, 23 March 2008 14:25 Go to previous messageGo to next message
SODPaddy is currently offline  SODPaddy
Messages: 233
Registered: August 2005
Location: Germany
Karma: 0
Recruit

<?php

$handle = fopen("serverstatus/fdsstatus.txt","r");
while (!feof($handle)) {
	$line = fgets($handle, 1024);

	$write = explode(",", $line);

	$color = array("green", "green", "yellow", "yellow", "red", "red", "green", "green", "green" );
	$i = 0;

	echo "<span style=\"color: $color[$i++]\">". $write['0'] ."</span><br>";
	echo "<span style=\"color: $color[$i++]\">". $write['1'] ."</span>";
	echo "<span style=\"color: $color[$i++]\">". $write['2'] ."</span>";
	echo "<span style=\"color: $color[$i++]\">". $write['3'] ."</span>";
	echo "<span style=\"color: $color[$i++]\">". $write['4'] ."</span>";
	echo "<span style=\"color: $color[$i++]\">". $write['5'] ."</span>";
	echo "<span style=\"color: $color[$i++]\">". $write['6'] ."</span>";
	echo "<span style=\"color: $color[$i++]\">". $write['7'] ."</span>";
	echo "<span style=\"color: $color[$i++]\">". $write['8'] ."</span>";
}
fclose ($handle);  
?>


http://www.eh-server.com/list.php does not runing ... some idea


Website: www.Area54.eu

Once 54, Always 54.
(\__/)
(O.o )
(___)
Visit us at www.Area54.eu

[Updated on: Sun, 23 March 2008 15:04]

Report message to a moderator

Re: PHP Serverstatusbox [message #323527 is a reply to message #323408] Sun, 23 March 2008 15:20 Go to previous messageGo to next message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma: 0
General (5 Stars)
Use this instead;

<?php

$fileContent = file_get_contents ( "serverstatus/fdsstatus.txt" );
$write = explode ( "\n", $fileContent );

$color = array("green", "green", "yellow", "yellow", "red", "red", "green", "green", "green" );

for ( $i = 0; $i < 9; $i++ )
	echo "<span style=\"color: $color[$i]\">". $write[$i] ."</span><br>";
?>



The problem with your original code is your trying to write the entire thing for every line you read from the file, which ends up with the entire thing being written in green.


http://steamsignature.com/card/1/76561197975867233.png

[Updated on: Sun, 23 March 2008 15:23]

Report message to a moderator

Re: PHP Serverstatusbox [message #323545 is a reply to message #323408] Sun, 23 March 2008 16:51 Go to previous message
SODPaddy is currently offline  SODPaddy
Messages: 233
Registered: August 2005
Location: Germany
Karma: 0
Recruit

added Smile

http://ehserv.netgamezone.de/news.php on the right side


Website: www.Area54.eu

Once 54, Always 54.
(\__/)
(O.o )
(___)
Visit us at www.Area54.eu
Previous Topic: Nickname exploit
Next Topic: Hud quality
Goto Forum:
  


Current Time: Fri Dec 20 10:38:23 MST 2024

Total time taken to generate the page: 0.01277 seconds