Jump to content

Calculate peak of server(s)


j0han

Recommended Posts

http://radio.j0han.se/julr/

 

I'm using a multi-server-stats script for shoutcast, to retrive listeners from servers, and in the script it has a $peak variable.

 

The thing is that i want that it shall take all the $peak from the servers and print it out as a record, (add $peak from all servers)

 

It must be something doing with this line, right?

 

if ($stats[1] == "1")
			{
			$song[$i] = $stats[6];
			$listeners[$i] = $stats[0];
			$max[$i] =  $stats[3];
			$bitrate[$i] = $stats[5];
			$peak[$i] = $stats[2];
			if ($stats[0] == $max[$i]) 
				{ 
				$msg[$i] .= "<span class=\"red\">";
				}
			$msg[$i] .= "Server is up at $bitrate[$i] kbps with $listeners[$i] of $max[$i] listeners";
			if ($stats[0] == $max[$i]) 
				{ 
				$msg[$i] .= "</span>";
				}
			$msg[$i] .= "\n    <p><b>Listener peak:</b> $peak[$i]";

 

Hopefully you can help me!

 

heres a link for the script. http://j0han.se/stats.phps

Link to comment
https://forums.phpfreaks.com/topic/180654-calculate-peak-of-servers/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.