| Pages: [1] :: one page |
| Author |
Thread Statistics | Show CCP posts - 0 post(s) |

UKNOWN KILLER
|
Posted - 2008.03.09 23:52:00 -
[1]
Hi All
Is there a way of getting the server status and number of players connected???
I have found the MOTD but cant find any other XML's
Thanx
UK
|

Xaroth Brook
Minmatar BIG Ka-Tet
|
Posted - 2008.03.10 01:18:00 -
[2]
you can try looking at the EVEMon code, the EVEServer.cs file (if my mind didn't fail me) contains the code that they use to get the server status.
One tip, you do NOT need to -send- data to the server (EVEMon tries to 'fool' the servers into thinking it's a client), as the server will send you the data you need the second you connect.
It was like a baby, it landed on my lap and was helpless and totally defenseless. Then I shot it and bragged about it on a killboard.
|

Chruker
|
Posted - 2008.03.11 09:28:00 -
[3]
Originally by: Xaroth Brook you can try looking at the EVEMon code, the EVEServer.cs file (if my mind didn't fail me) contains the code that they use to get the server status.
One tip, you do NOT need to -send- data to the server (EVEMon tries to 'fool' the servers into thinking it's a client), as the server will send you the data you need the second you connect.
If your server status script do send the right data to the server it gets some nice extra information like number in queue or the Not Accepting Connections flag.
----- http://games.chruker.dk/eve_online ----- Top wishes: - No daily downtime - Faster training on sisi - Speedup IGB table rendering |

convey killer
|
Posted - 2008.03.13 22:19:00 -
[4]
Edited by: convey killer on 13/03/2008 22:22:35 Thx guys,
I have a look at it in the weekend.....I have never used or really looked at c++ so this could be interesting....
CK
|

UKNOWN KILLER
|
Posted - 2008.03.13 22:22:00 -
[5]
I have never used it either....do u guys have any tips?
|

Karina Redstar
Pure Skunkworks Pure.
|
Posted - 2008.03.14 11:40:00 -
[6]
I use this to pull online players from server:
<?php
$location = "87.237.38.200"; $fp = fsockopen($location, 26000, $errno, $errstr, 5); $out = "GET / HTTP/1.1\r\n"; $out .= "Host: ".$location."\r\n"; $out .= "Connection: Close\r\n\r\n"; fwrite($fp, $out); while (!feof($fp)) { $result .= fgets($fp, 256); } fclose($fp);
if (strlen($result) > 21) {
switch (hexdec(bin2hex(substr($result,19,1)))) { case 4: $userbytes = 4; break; case 5: $userbytes = 2; break; case 6: $userbytes = 1; break; }
$multiplyer = 1;
for($i=0;$i<$userbytes;$i++) { $players = hexdec(bin2hex(substr($result,20+$i,1))) * $multiplyer ; $multiplyer *= 256; }
print date(DATE_RFC822)." Tranquility is up ($players players online)\n" ;
}
?>
Found also this on Google cache and mirrored on my server: EVE eveServer (Tests)
|

Nisd
INDUSTRIA BATTLETECH
|
Posted - 2008.03.17 19:57:00 -
[7]
i can't get the script to work it just say
"Mon, 17 Mar 08 20:55:34 +0100 Tranquility is up (0 players online)"
|

Perry Wolf
Jagdkommando Phoenix Allianz
|
Posted - 2008.03.17 21:24:00 -
[8]
Hi !
Try this one:
<p>This script reads player count from EVE Tranquility server.</p><br /><br /> <?php function GetEvePlayers() { // IP of gameserver (Tranquility) $strEVEServer = '87.237.38.200'; // Serverport $intPortNumber = 26000; // Timeout $strTimeOut = 8;
function string2hex($String) { if (trim($String) != '') { $strHex = ''; $intLength = strlen($String); for ($intCounter = 0; $intCounter < $intLength; $intCounter++) { if ($intCounter > 0) $strBound="-"; else $strBound=""; $strHex.=$strBound.str_pad(dechex(ord($String[$intCounter])), 2, 0, STR_PAD_LEFT); } return $strHex; } }
$objFP = @fsockopen($strEVEServer, $intPortNumber, &$strErrumber, &$strErrString, $strTimeOut); if (!$objFP) { $strResult = 'Server down'; } else { $arrBuffer = fgets($objFP,41); fclose($objFP);
$strResult = $arrBuffer[21].$arrBuffer[20]; $strResult = string2hex($strResult); $strResult = hexdec($strResult); } return $strResult; }
echo 'Players online: '.GetEvePlayers(); ?>
|

Nisd
INDUSTRIA BATTLETECH
|
Posted - 2008.03.17 21:29:00 -
[9]
well that works thxs
|

Trente Reznor
Scream Inc.
|
Posted - 2008.03.18 02:47:00 -
[10]
Where exactly do you copy and paste this info? -- SCREAM, INC. IS RECRUITING (CLICK ME)
|

UKNOWN KILLER
UKKILLER Corp TRE GAFFEL
|
Posted - 2008.03.18 05:39:00 -
[11]
Karina,
thx for that.....after a little playing last night i managed to get it working.
UK
|

Nisd
INDUSTRIA BATTLETECH
|
Posted - 2008.03.19 15:27:00 -
[12]
Make a php file on a web server with php and it works :D nothing more to say....
|

Lew Netstalker
Gallente N.U.R.S.E.
|
Posted - 2008.04.24 15:23:00 -
[13]
Edited by: Lew Netstalker on 24/04/2008 15:24:14
Originally by: Perry Wolf ... $objFP = @fsockopen($strEVEServer, $intPortNumber, &$strErrumber, &$strErrString, $strTimeOut); ...
Please note that the call-time pass-by-reference is deprecated and thus you get warnings by using this line at several ISPs. As far as I understand it you donŠt need the & as error number and error string are always referenced, as stated in the fsockopen() manual. (Link to fsockopen() manual) Have a look at this page for some more information about that.
At least the PHP on my ISPs silly server was complaining about the above line. This one works fine there: $objFP = @fsockopen($strEVEServer, $intPortNumber, $strErrumber, $strErrString, $strTimeOut); The option to alter php.ini to allow call-by-references wasnŠt given here, so I had to work around.
|
| |
|
| Pages: [1] :: one page |
| First page | Previous page | Next page | Last page |