Script: Server Check - how to

Mu online season 21 - grand opening

Primal

LOMCN VIP
VIP
Jun 28, 2004
1,756
102
289
as i know people like lifco have the hero files, and the source i posted at:
http://www.lomcn.co.uk/forum/showthread.php?t=59252
im not sure will support them

so heres how to check for the data such as user count/server name/server type:

Example using IP: 78.40.35.178 (replace 78.40.35.178 with the ip you want to check this for your own files)
PHP:
<?php
$port="3000";
$connect = fsockopen( '78.40.35.178', $port, $errno, $errstr, 5 );
if (!$connect) {
echo "No Response From Server";
} else {
$output = fread( $connect, 3000 );
$data = explode( "########", $output );
echo $data[0] ;
}
 ?>
if you did this check with a mir2.3 server ip (such as 78.40.35.178) youd have this result:

Code:
2;C;/Diamond/0/DiamondM2/thedeath-v2.321//;C;/Diamond/14/DiamondM2/thedeath-v2.321//;

now your probably wonderin wot the hells that, but then if you change the php code to this:

Example using IP: 78.40.35.178 (replace 78.40.35.178 with the ip you want to check this for your own files)
PHP:
<?php
$port="3000";
$connect = fsockopen( '78.40.35.178', $port, $errno, $errstr, 5 );
if (!$connect) {
echo "No Response From Server";
} else {
$output = fread( $connect, 3000 );
$data = explode( "/", $output );
echo $data[0] ;
}
 ?>
then the output would be :
Code:
2;C;
as it splits the result by the /

if you notice the "echo $data[0] ;" at the bottom, this is whats showing the output, change the "$data[0]" to "$data[1]" and the output would be:
Code:
Diamond

You understand?

so heres the information for the Mir2.3 results:
Code:
$data[]	Result:			Info:
0	2;C;			Dunno what this is
1	Diamond			Server Name
2	0			Ammount of people connected to LoginGate
3	DiamondM2		Server type: DiamondM2 = Mir2
4	thedeath-v2.321		Files?
5				empty
6	;C;			Dunno what this is
7	Diamond			Server Name
8	14			User Count
9	DiamondM2		Server Type
10	thedeath-v2.321		Files?
11				empty
12	;			Dunno what this is

Mir1.9 Results:
Code:
$data[]	Result:			Info:
0	3;-/			dunno
1	-/			dunno
2	-/			dunno
3	-;Massacre/		-;servername
4	99/			dunno
5	0/			login count?
6	正常 ;Massacre/		servertype ; servername
7	0/			login count?
8	21/			usercount
9	正常 ;			servertype (正常 = 1.9)

Mir3 Results:
Code:
$data[]	Result:			Info:
0	2;Supreme/		dunno + servername
1	99/			dunno
2	0/			Login screen count
3	GOOD;Supreme/		mir type + servername (GOOD = mir3)
4	0/			dunno mite be login screen count n not other
5	33/			usercount
6	GOOD;			servername
 
Last edited: