Opferlamm-Clan Board
www.opferlamm-clan.de
Verantwortlich für diese bösen Machenschaften: siehe Impressum

Registrierung Kalender Mitgliederliste Suche Häufig gestellte Fragen Zur Startseite

Opferlamm-Clan Board » Call of Duty: World at War » Call of Duty: World at War - Hilfe » [gelöst] Patch 1.5 und fehlerhaftes Auslesen per UDP » Hallo Gast [Anmelden|Registrieren]
Letzter Beitrag | Erster ungelesener Beitrag Druckvorschau | An Freund senden | Thema zu Favoriten hinzufügen
Neues Thema erstellen Antwort erstellen
Zum Ende der Seite springen [gelöst] Patch 1.5 und fehlerhaftes Auslesen per UDP
Autor
Beitrag « Vorheriges Thema | Nächstes Thema »
Dungeonwatcher
Hat kein Zuhause


Dabei seit: 22.01.2008
Beiträge: 76


[gelöst] Patch 1.5 und fehlerhaftes Auslesen per UDP Auf diesen Beitrag antworten Zitatantwort auf diesen Beitrag erstellen Diesen Beitrag editieren/löschen Diesen Beitrag einem Moderator melden       Zum Anfang der Seite springen

Moin! cool

Ich lasse auf meiner Webseite eine Ministatistik für Cod:UO, CoD:AWE und CoD:WaW anzeigen. Das ganze passiert per PHP. Für CoD:WaW sieht der PHP Quellcode so aus:

Code einblendenCode angehängt. Klicke hier zum Ein-/Ausblenden

code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
$server_ip = "udp://$a[0]";
$server_port5 = "28968"; // CoD:WaW
$serverip = substr($server_ip, 6);

[...]

// Call of Duty 5 ----------------------------------------------------------------------------------------------------
$connect = fsockopen($server_ip, $server_port5, $errno, $errstr, 5);

if ($connect)
	{
		socket_set_timeout ($connect, 1, 000000);
		$send = "ÿÿÿÿ" . chr (0x02) . "getstatus";
		$debug1 = fputs($connect, $send);
		$debug2 = fwrite ($connect, $send);
		$output = fread ($connect, 1);
		if (! empty ($output))
			{
				do
					{
						$status_pre = socket_get_status ($connect);
						$output = $output . fread ($connect, 1);
						$status_post = socket_get_status ($connect);
					}
					while ($status_pre['unread_bytes'] != $status_post['unread_bytes']);
			};
		fclose($connect);

		$output = explode ("\\", $output);
		$max_index = array_search ("sv_maxclients", $output);$max_clients5 = $output[$max_index+1];
		$max_index = array_search ("sv_privateClients", $output);$privat5 = $output[$max_index+1];
		$max_index = array_search ("mapname", $output);$mapname5 = $output[$max_index+1];
		$max_index = array_search ("sv_hostname", $output);$hostname5 = $output[$max_index+1];
		$max_index = array_search ("g_gametype", $output);$gametype5 = $output[$max_index+1];
		$max_index = array_search ("sv_punkbuster", $output);$punkbuster5 = $output[$max_index+1];
		$max_index = array_search ("sv_pure", $output);$pure5 = $output[$max_index+1];
		$max_index = array_search ("sv_voice", $output);$voice5 = $output[$max_index+1];
		$max_index = array_search ("g_antilag", $output);$alag5 = $output[$max_index+1];
		$max_index = array_search ("pswrd", $output);$passwort5 = $output[$max_index+1];
		$max_index = array_search ("_Location", $output);$Standort5 = $output[$max_index+1];
		$max_index = array_search ("_Admin", $output);$admin5 = $output[$max_index+1];
		$max_index = array_search ("_Website", $output);$Web5 = $output[$max_index+1];
		$max_index = array_search ("_Host", $output);$Host5 = $output[$max_index+1];
		$max_index = array_search ("_Email", $output);$EMail5 = $output[$max_index+1];
		$max_index = array_search ("_IRC", $output);$IRC5 = $output[$max_index+1];
		$max_index = array_search ("_ICQ", $output);$ICQ5 = $output[$max_index+1]; 
		$max_index = array_search ("gamename", $output);$gamename5 = $output[$max_index+1];
		$max_index = array_search ("shortversion", $output);$Version5 = $output[$max_index+1];
		$max_index = array_search ("_Mod", $output);$Mod5 = $output[$max_index+1];
		$max_index = array_search ("sv_maxPing", $output);$maxPing5 = $output[$max_index+1];
		$max_index = array_search ("sv_minPing", $output);$minPing5 = $output[$max_index+1];
		$max_index = array_search ("fs_game", $output);$fsgame5 = $output[$max_index+1];

		if ($Maps[$mapname5] || "") {$mapnamelong5 = $Maps[$mapname5];}
		if ($mapnamelong5 == "") {$mapnamelong5 = $mapname5;}
		if ($fsgame5 == "_Admin") {$fsgame5 = "";}
		if ($Host5 == "_Admin") {$Host5 = "";}
		if ($Host5 == "Admin") {$Host5 = "";}
		if ($Mod5 == "_Admin") {$Mod5 = "";}
		if ($Mod5 == "Admin") {$Mod5 = "";}
		if ($IRC5 == "_Admin") {$IRC5 = "";}
		if ($IRC5 == "#") {$IRC5 = "-";}
		if ($ICQ5 == "_Admin") {$ICQ5 = "-";}
		if ($ICQ5 == "Admin") {$ICQ5 = "-";}
		if ($maxPing5 == "_Admin") {$maxPing5 = "-";}
		if ($Web5 == "_Admin") {$Web5 = "-";}
		if ($minPing5 == "_Admin") {$minPing5 = "-";}
		if ($gametype5 == "ctf") {$gametype5 = "Capture the Flag";}
		if ($gametype5 == "dm") {$gametype5 = "Deathmatch";}
		if ($gametype5 == "dom") {$gametype5 = "dom";}
		if ($gametype5 == "twar") {$gametype5 = "twar";}
		if ($gametype5 == "tdm") {$gametype5 = "Team Deathmatch";}
		if ($gametype5 == "sd") {$gametype5 = "Suchen and Zerstören";}
		if ($gametype5 == "sab") {$gametype5 = "sab";} 

		$last_value = count($output) - 1;
		$players5_string = $output[$last_value];
		$players5_string = explode("\n", $players5_string);
		for ($i = 1; $i != count($players5_string); $i++)
			{
				$split = explode(" ", $players5_string[$i], 3);
				$playerlist5[$i-1]['score5'] = $split[0];
				$playerlist5[$i-1]['ping5'] = $split[1];
				$playerlist5[$i-1]['player5'] = $split[2];
			}

		function cmp5 ($a, $b)
			{
				if ($a["score5"] > $b["score5"])
					{
						return -1;
					}
				if ($a["score5"] < $b["score5"])
					{
						return 1;
					}
				if ($a["score5"] == $b["score5"])
					{
						return 0;
					}
			}
		@usort($playerlist5, "cmp5");
		$players5 = count($playerlist5) - 1;
	}

	$template->assign_vars(array(
	'SERVER_IP'				=> $serverip,
	'SERVER_PORT5'			=> $server_port5,
	'VERSION5'				=> $Version5,
	'GAMENAME5'				=> $gamename5,
	'GAMETYPE5'				=> $gametype5,
	'PLAYERS5'				=> $players5,
	'MAX_PLAYERS5'			=> $max_clients5,
	'PRIVAT5'				=> $privat5,
	'MIN_PING5'				=> $minPing5,
	'MAX_PING5'				=> $maxPing5,
	'MAP_NAME5'				=> $mapnamelong5,
	'FS_GAME5'				=> $fsgame5,
	'MAP_MAP5'				=> $mapname5,
	'L_SERVER_IP'			=> $lang['server_ip'],
	'L_SERVER_PORT'			=> $lang["server_port"],
	'L_SERVER_HOSTNAME' 	=> farben($hostname),
	'L_SERVER_PORT'			=> $lang["server_port"],
	'L_SERVER_GAME'			=> $lang["server_game"],
	'L_SERVER_GAME_TYPE'	=> $lang["server_game_type"],
	'L_SERVER_VERSION'		=> $lang["server_version"],
	'L_SERVER_GAMER'		=> $lang["server_gamer"],
	'L_SERVER_SLOTS'		=> $lang["server_slots"],
	'L_SERVER_PING'			=> $lang["server_ping"],
	'L_GAMER_NAME'			=> $lang["gamer_name"],
	'L_GAMER_POINT'			=> $lang["gamer_point"],
	'L_GAMER_PING'			=> $lang["gamer_ping"],
	'L_GAMER_ONLINE'		=> $lang["gamer_online"],
	'L_FS_GAME'				=> $lang["fs_game"],
	'L_OFFLINE'				=> $lang["offline"],
	'MAP_MAP5'				=> (@file_exists('./images/cod/'.$mapname5.'.jpg')) ? '<img src="./images/cod/'.$mapname5.'.jpg" border="0" alt="" />' : '<img src="./images/cod/unknown.jpg" border="0" alt="" />',
//	'PURE'					=> ($pure == 1 ? "<img src='./images/cod/pu_an.jpg' alt='Original' title='Original' border='0' />" : "<img src='./images/cod/pu_aus.jpg' alt='unPure' title='unPure'>"),
//	'PASSWORD'				=> ($passwort == 1 ? "<img src='./images/cod/lo_an.jpg' alt='mit Passwort' title='nur mit Passwort' border='0' />" : "<img src='./images/cod/lo_aus.jpg' alt='ohne Passwort' title='ohne Passwort' border='0' />"),
//	'ALAG'					=> ($alag == 1 ? "<img src='./images/cod/al_an.jpg' alt='mit Antilag' title='mit Antilag' border='0' />" : "<img src='./images/cod/al_aus.jpg' alt='ohne Antilag' title='ohne Antilag' border='0' />"),
//	'VOICE'					=> ($voice == 1 ? "<img src='./images/cod/gv_an.jpg' alt='mit GameVoice' title='mit Gamevoice' border='0' />" : "<img src='./images/cod/gv_aus.jpg' alt='ohne GameVoice' title='ohne Gamevoice' border='0' />"),
//	'PUNKBUSTER'			=> ($punkbuster == 1 ? "<img src='./images/cod/pb_an.jpg' alt='mit PunkBuster' title='mit Punkbuster' border='0' />" : "<img src='./images/cod/pb_aus.jpg' alt='ohne Punkbuster' title='ohne Punkbuster' border='0' />")
	)
);

if ($players5 >= 0)
	{
		$template->assign_block_vars('cod5_server_online', array());
		for ($i = 0; $i < count($playerlist5); ++$i)
			{
				$template->assign_block_vars('cod5_server_online.cod5_spieler', array(
					'PLAYER5'		=> farben(str_replace("\"", "", $playerlist5[$i]['player5'])),
					'PLAYER_SCORE5'	=> $playerlist5[$i]['score5'],
					'PLAYER_PING5'	=> $playerlist5[$i]['ping5']
					));
			}
		if ( $userdata['session_logged_in'] )
			{
				$template->assign_block_vars('cod5_server_online.switch_user_logged_in', array());
			}
	}
if ($players5 < 0)
	{
		$template->assign_block_vars('cod5_server_offline', array());
	}

// ****************************************************************************************



Warum auch immer, mit dem Patch 1.5 funktioniert dies nicht mehr. Der Server wird immer als Offline gemeldet, was jedoch nicht stimmt.
Spiele ich das Backup v1.4.1 zurück, stimmt auch die Anzeige wieder. verwirrt

Frage an die hiesigen Spezielisten:

Woran könnte das liegen, bzw. was läuft hier falsch?

Bye


--- Edit by Nightwing: Thema in Hilfe verschoben ---

Dieser Beitrag wurde 3 mal editiert, zum letzten Mal von Nightwing: 19.07.2009 12:37.

Dungeonwatcher ist offline Homepage von Dungeonwatcher Beiträge von Dungeonwatcher suchen Nehmen Sie Dungeonwatcher in Ihre Freundesliste auf
Nightwing
Padawan ;-)


images/avatars/avatar-1617.jpg


Dabei seit: 15.01.2007
Beiträge: 4.858


Auf diesen Beitrag antworten Zitatantwort auf diesen Beitrag erstellen Diesen Beitrag editieren/löschen Diesen Beitrag einem Moderator melden       Zum Anfang der Seite springen

Okay, danke für die Meldung, ich hab schon an mir gezweifelt.
Mir zeigt es meine Server auch als offline an.
Ich nutze modifizierte Livestats:

Code einblendenCode angehängt. Klicke hier zum Ein-/Ausblenden

code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:
251:
252:
253:
254:
255:
256:
257:
258:
259:
260:
261:
262:
263:
264:
265:
266:
267:
268:
269:
270:
271:
272:
273:
274:
275:
276:
277:
278:
279:
280:
281:
282:
283:
284:
285:
286:
287:
288:
289:
290:
291:
292:
293:
294:
295:
296:
297:
298:
299:
300:
301:
302:
303:
304:
305:
306:
307:
308:
309:
310:
311:
312:
313:
314:
315:
316:
317:
318:
319:
320:
321:
322:
323:
324:
325:
326:
327:
328:
329:
330:
331:
332:
333:
334:
335:
336:
337:
338:
339:
340:
341:
342:
343:
344:
345:
346:
347:
348:
349:
350:
351:
352:
353:
354:
355:
356:
357:
358:
359:
360:
361:
362:
363:
364:
365:
366:
367:
368:
369:
370:
371:
372:
373:
374:
375:
376:
377:
378:
379:
380:
381:
382:
383:
384:
385:
386:
387:
388:
389:
390:
391:
392:
393:
394:
395:
396:
397:
398:
399:
400:
401:
402:
403:
404:
405:
406:
407:
408:
409:
410:
411:
412:
413:
414:
415:
416:
417:
418:
419:
420:
421:
422:
423:
424:
425:
426:
427:
428:
429:
430:
431:
432:
433:
434:
435:
436:
437:
438:
439:
440:
441:
442:
443:
444:
445:
446:
447:
448:
<?php

include_once ("functions.php");

// In diesem Bereich sind die einzigsten Änderungen die am Script vorgenommen werden müssen
// ****************************************************************************************

// Serverparameter:

$server_ip = "78.143.44.221";	// Server IP
$server_port = "28960"; 		// Query Port
$server_streamt = 1;			// 1 = Server streamt, 0 = Server streamt nicht.

// ****************************************************************************************
// Ab hier bitte nichts mehr ändern, außer man weiß was man tut und will das Script an das eigene Design anpassen:

// Verbindungsaufbau
$server_ip = "udp://" . $server_ip;
$serverip = substr($server_ip, 6);
$connect = fsockopen($server_ip, $server_port, $errno, $errstr, 30);

if ($connect) {

  socket_set_timeout ($connect, 1, 000000);
  $send = "ÿÿÿÿ" . chr (0x02) . "getstatus";
  $debug1 = fputs($connect, $send);
  $debug2 = fwrite ($connect, $send);
  $output = fread ($connect, 1);
  
  if (! empty ($output)) {
  
    do {
	
      $status_pre = socket_get_status ($connect);
      $output = $output . fread ($connect, 1);
      $status_post = socket_get_status ($connect);
    } while ($status_pre['unread_bytes'] != $status_post['unread_bytes']);
  };
  
  // Verbindung schliessen
  fclose($connect);

  // Verarbeite Daten
  $output = explode ("\\", $output);
  $max_index = array_search ("sv_maxclients", $output);$max_clients = $output[$max_index+1];
  $max_index = array_search ("sv_privateClients", $output);$privat = $output[$max_index+1];
  $max_index = array_search ("mapname", $output);$mapname = $output[$max_index+1];
  $max_index = array_search ("sv_hostname", $output);$hostname = $output[$max_index+1];
  $max_index = array_search ("g_gametype", $output);$gametype = $output[$max_index+1];
  $max_index = array_search ("sv_punkbuster", $output);$punkbuster = $output[$max_index+1];
  $max_index = array_search ("sv_pure", $output);$pure = $output[$max_index+1];
  $max_index = array_search ("sv_voice", $output);$voice = $output[$max_index+1];
  $max_index = array_search ("g_antilag", $output);$alag = $output[$max_index+1];
  $max_index = array_search ("pswrd", $output);$passwort = $output[$max_index+1];

  $max_index = array_search ("_Location", $output);$Standort = $output[$max_index+1];
  $max_index = array_search ("_Admin", $output);$admin = $output[$max_index+1];
  $max_index = array_search ("_Website", $output);$Web = $output[$max_index+1];
  $max_index = array_search ("_Host", $output);$Host = $output[$max_index+1];
  $max_index = array_search ("_Email", $output);$EMail = $output[$max_index+1];
  $max_index = array_search ("_IRC", $output);$IRC = $output[$max_index+1];
  $max_index = array_search ("_ICQ", $output);$ICQ = $output[$max_index+1]; 

  $max_index = array_search ("gamename", $output);$gamename = $output[$max_index+1];
  $max_index = array_search ("shortversion", $output);$Version = $output[$max_index+1];
  $max_index = array_search ("protocol", $output);$protokol = $output[$max_index+1];
  $max_index = array_search ("_Mod", $output);$Mod = $output[$max_index+1];
  $max_index = array_search ("sv_maxPing", $output);$maxPing = $output[$max_index+1];
  $max_index = array_search ("sv_minPing", $output);$minPing = $output[$max_index+1];
  $max_index = array_search ("fs_game", $output);$fsgame = $output[$max_index+1];

  if ($fsgame == "_Admin") {$fsgame = "";}
  if ($Host == "_Admin") {$Host = "";}
  if ($Host == "Admin") {$Host = "";}
  if ($Mod == "_Admin") {$Mod = "";}
  if ($Mod == "Admin") {$Mod = "";}
  if ($IRC == "_Admin") {$IRC = "";}
  if ($IRC == "#") {$IRC = "-";}
  if ($ICQ == "_Admin") {$ICQ = "-";}
  if ($ICQ == "Admin") {$ICQ = "-";}
  if ($maxPing == "_Admin") {$maxPing = "-";}
  if ($Web == "_Admin") {$Web = "-";}
  if ($minPing == "_Admin") {$minPing = "-";}

  if ($gamename == "Call of Duty") $gamename_short = "CoD";
  if ($gamename == "CoD:United Offensive") $gamename_short = "CoD UO";
  if ($gamename == "Call of Duty 2") $gamename_short = "CoD 2";
  if ($gamename == "Call of Duty 4") $gamename_short = "CoD 4 MW";  
  if ($gamename == "Call of Duty: World at War") $gamename_short = "CoD WW";

  if ($gametype == "re") {$gametype = "Retrieval";$gametype_short = "RE";}
  if ($gametype == "dm") {$gametype = "Deathmatch";$gametype_short = "DM";}
  if ($gametype == "sd") {$gametype = "Suchen and Zerstören";$gametype_short = "SD";} 
  if ($gametype == "tdm") {$gametype = "Team Deathmatch";$gametype_short = "TDM";}
  if ($gametype == "war") {$gametype = "Team Deathmatch";$gametype_short = "TDM";}
  if ($gametype == "bel") {$gametype = "Hinter feindl. Linien";$gametype_short = "BEL";}
  if ($gametype == "hq") {$gametype = "Hauptquartier";$gametype_short = "HQ";}
  if ($gametype == "dom") {$gametype = "Domination";$gametype_short = "DOM";}
  if ($gametype == "ctf") {$gametype = "Capture the Flag";$gametype_short = "CTF";}
  if ($gametype == "bas") {$gametype = "Base Assault";$gametype_short = "BAS";}
  if ($gametype == "koth") {$gametype = "Hauptquartier";$gametype_short = "KOTH";}
  if ($gametype == "sab") {$gametype = "Sabotage";$gametype_short = "SAB";}
  if ($gametype == "twar") {$gametype = "Krieg";$gametype_short = "TWAR";}
  if ($gametype == "ctfb") {$gametype = "Capture the Flag back";$gametype_short = "CTFB";}
  if ($gametype == "ch") {$gametype = "Capture and hold";$gametype_short = "CH";}
  if ($gametype == "htf") {$gametype = "Hold the Flag";$gametype_short = "HTF";}
  if ($gametype == "vip") {$gametype = "V.I.P.";$gametype_short = "VIP";}
  if ($gametype == "wrz") {$gametype = "Warzone";$gametype_short = "WRZ";}
  
  // Erweiterte PB Abfrage
  if ($punkbuster == 1 && $server_streamt == 0) $pb = "aktiv";
  else if ($punkbuster == 1 && $server_streamt == 1) $pb = "aktiv & streaming";
  else if ($punkbuster == 0) $pb = "inaktiv";
  
  // Ermittlung der Version CoD WW
  if ($protokol == 94) $Version_codww = "1.1";
  else if ($protokol == 95) $Version_codww = "1.2";
  else if ($protokol == 96) $Version_codww = "1.3";
  else if ($protokol == 97) $Version_codww = "1.4";
  else if ($protokol == 99) $Version_codww = "1.5";
  
  $last_value = count($output) - 1;
  $players_string = $output[$last_value];
  $players_string = explode("\n", $players_string);
  
  for ($i = 1; $i != count($players_string); $i++) {
  
	$split = explode(" ", $players_string[$i], 3);
	$playerlist[$i-1]['score'] = $split[0];
	$playerlist[$i-1]['ping'] = $split[1];
	$playerlist[$i-1]['player'] = $split[2];

  }
	  
  @usort($playerlist, "cmp");
	$players = count($playerlist) - 1;

  // Maps für CoD
  if ($gamename_short == "CoD") {
  
	include_once ("livestats/maps_cod.php");
	
	$mappic_folder = "cod";
	$GameIcon_small = "cod_icon.gif";
	$GameIcon_big = "cod_font.png";
  
	if ($Maps[$mapname] || "") {
  
	  $mapnamelong = $Maps[$mapname];
	}
  
	if ($mapnamelong == "") {
  
	  $mapnamelong = $mapname;
	}
  }
  
  // Maps für CoD UO
  else if ($gamename_short == "CoD UO") {
  
	include_once ("livestats/maps_coduo.php");
	
	$mappic_folder = "coduo";
	$GameIcon_small = "coduo_icon.gif";
	$GameIcon_big = "coduo_font.png";
  
	if ($Maps[$mapname] || "") {
  
	  $mapnamelong = $Maps[$mapname];
	}
  
	if ($mapnamelong == "") {
  
	  $mapnamelong = $mapname;
	}
  }
  
  // Maps für CoD 2
  else if ($gamename_short == "CoD 2") {
  
	include_once ("livestats/maps_cod2.php");
	
	$mappic_folder = "cod2";
	$GameIcon_small = "cod2_icon.gif";
	$GameIcon_big = "cod2_font.png";
  
	if ($Maps[$mapname] || "") {
  
	  $mapnamelong = $Maps[$mapname];
	}
  
	if ($mapnamelong == "") {
  
	  $mapnamelong = $mapname;
	}
  }
  
  // Maps für CoD 4 MW
  else if ($gamename_short == "CoD 4 MW") {
  
	include_once ("livestats/maps_cod4.php");
	
	$mappic_folder = "cod4";
	$GameIcon_small = "cod4_icon.gif";
	$GameIcon_big = "cod4_font.png";
  
	if ($Maps[$mapname] || "") {
  
	  $mapnamelong = $Maps[$mapname];
	}
  
	if ($mapnamelong == "") {
  
	  $mapnamelong = $mapname;
	}
  }
  
  // Maps für CoD WW
  else if ($gamename_short == "CoD WW") {
  
	include_once ("livestats/maps_codww.php");
	
	$mappic_folder = "codww";
	$GameIcon_small = "codww_icon.gif";
	$GameIcon_big = "codww_font.png";
  
	if ($Maps[$mapname] || "") {
  
	  $mapnamelong = $Maps[$mapname];
	}
  
	if ($mapnamelong == "") {
  
	  $mapnamelong = $mapname;
	}
  }
  
  // Ist ein Mappic vorhanden?
  $mappic = "livestats/bilder/small/$mappic_folder/$mapname.jpg";

  if (file_exists($mappic)) {

	$mappic_small = $mapname.".jpg";
  } 

  // Sonst nehme unknown.jpg
  else {

	$mappic_small = "unknown.jpg";
  }
  
  $img_offline = "livestats/bilder/general/offline.jpg";
}
//Anzeige NavBox

// Server offline
if (!$max_clients) {
?>
<table border="0" cellspacing="0" cellpadding="0" align="center">
    <tr>
      <td valign="top">
      <table border="0" cellspacing="0" cellpadding="0">
       <tr>
        <td class="backtds">
	     <table border="0" cellspacing="0" cellpadding="0">
          <tr>
           <td ><strong>Server:</strong><br/>&nbsp;
            <font color="#ff0000">Server ist Offline</font>
           </td>
          </tr>
          <tr>
           <td ><strong>Game:</strong><br/>&nbsp;
           ---</td>
          </tr>
          <tr>
           <td ><strong>IP Adresse:</strong><br/>&nbsp;
		   <a href="hlsw://<?=$serverip?>:<?=$server_port?>"><?=$serverip?>:<?=$server_port?></a>
          </tr>
          <tr>
           <td ><strong>Mod:</strong><br/>&nbsp;
		   ---</a>
          </tr>
          <tr>
           <td ><strong>Player:</strong><br/>&nbsp;
           xx / xx (+x)</td>
          </tr>
          <tr>
           <td ><strong>Gametype:</strong><br/>&nbsp;
           ---</td>
          </tr>
          <tr>
           <td ><strong>Punkbuster:</strong><br/>&nbsp;
           <?=$pb?></td>
          </tr>
          <tr>
            <td><strong>Serverinfo:<br/>&nbsp;
            <a href="index.php?site=server">Hier klicken</a>
          </td>
       </tr>
        </table>
	</td>
       </tr>
	   	   <tr>
         <td height="10">&nbsp;</td>
       </tr>
       <tr>
        <td <img src="<?=$img_offline?>" width="130" height="90" border="0"><br></td>
       </tr>
       <tr>
	    <td ><strong>Map:</strong><br/>&nbsp;
		  ---
		</td>
       </tr>
      </table>
     </td>
    </tr>
   </table>

<?
}
// Server online, ist nicht CoD WW
else if ($max_clients && $gamename_short != "CoD WW"){
?>
<table border="0" cellspacing="0" cellpadding="0" align="center">
    <tr>
      <td valign="top">
      <table border="0" cellspacing="0" cellpadding="0">
       <tr>
        <td class="backtds">
	     <table border="0" cellspacing="0" cellpadding="0">
          <tr>
           <td ><strong>Server:</strong><br/>
                <div class="sBoxAbs"><?=farben($hostname)?></div>
           </td>
          </tr>
          <tr>
           <td ><strong>Game:</strong><br/>&nbsp;
           <img src="livestats/bilder/general/<?php echo $GameIcon_small ?>" width="16" height="16">  <?=$gamename_short?> (v. <?=$Version?>)</td>
          </tr>
          <tr>
           <td ><strong>IP Adresse:</strong><br/>&nbsp;
		   <a href="hlsw://<?=$serverip?>:<?=$server_port?>"><?=$serverip?>:<?=$server_port?></a>
          </tr>
          <tr>
           <td ><strong>Mod:</strong><br/>&nbsp;
		   <?=farben($Mod)?></a>
          </tr>
          <tr>
           <td ><strong>Player:</strong><br/>&nbsp;
           <?=$players?> / <?=$max_clients - $privat?> (+<?=$privat?>)</td>
          </tr>
          <tr>
           <td ><strong>Gametype:</strong><br/>&nbsp;
           <?=$gametype?></td>
          </tr>
          <tr>
           <td ><strong>Punkbuster:</strong><br/>&nbsp;
           <?=$pb?></td>
          </tr>
          <tr>
            <td><strong>Serverinfo:<br/>&nbsp;
            <a href="index.php?site=server">Hier klicken</a>
          </td>
       </tr>
        </table>
	</td>
       </tr>
	   	   <tr>
         <td height="10">&nbsp;</td>
       </tr>
       <tr>
        <td class="backtds"><img src="livestats/bilder/small/<?php echo $mappic_folder?>/<?php echo $mappic_small ?>" width="130" height="90"><br></td>
       </tr>
       <tr>
	    <td ><strong>Map:</strong><br/>
		  <div class="sBoxAbs"><?=$mapnamelong?></div>
		</td>
       </tr>
      </table>
     </td>
    </tr>
   </table>
<?
}
// Server online, ist CoD WW
else if ($max_clients && $gamename_short == "CoD WW"){
?>
<table border="0" cellspacing="0" cellpadding="0" align="center">
    <tr>
      <td valign="top">
      <table border="0" cellspacing="0" cellpadding="0">
       <tr>
        <td class="backtds">
	     <table border="0" cellspacing="0" cellpadding="0">
          <tr>
           <td ><strong>Server:</strong><br/>
                <div class="sBoxAbs"><?=farben($hostname)?></div>
           </td>
          </tr>
          <tr>
           <td ><strong>Game:</strong><br/>&nbsp;
           <img src="livestats/bilder/general/<?php echo $GameIcon_small ?>" width="16" height="16"> <?=$gamename_short?> (v. <?=$Version_codww?>)</td>
          </tr>
          <tr>
           <td ><strong>IP Adresse:</strong><br/>&nbsp;
		   <a href="hlsw://<?=$serverip?>:<?=$server_port?>"><?=$serverip?>:<?=$server_port?></a>
          </tr>
          <tr>
           <td ><strong>Mod:</strong><br/>&nbsp;
		   <?=farben($Mod)?></a>
          </tr>
          <tr>
           <td ><strong>Player:</strong><br/>&nbsp;
           <?=$players?> / <?=$max_clients - $privat?> (+<?=$privat?>)</td>
          </tr>
          <tr>
           <td ><strong>Gametype:</strong><br/>&nbsp;
           <?=$gametype?></td>
          </tr>
          <tr>
           <td ><strong>Punkbuster:</strong><br/>&nbsp;
           <?=$pb?></td>
          </tr>
          <tr>
            <td><strong>Serverinfo:<br/>&nbsp;
            <a href="index.php?site=server">Hier klicken</a>
          </td>
       </tr>
        </table>
	</td>
       </tr>
	   	   <tr>
         <td height="10">&nbsp;</td>
       </tr>
       <tr>
        <td class="backtds"><img src="livestats/bilder/small/<?php echo $mappic_folder?>/<?php echo $mappic_small ?>" width="130" height="90"><br></td>
       </tr>
       <tr>
	    <td ><strong>Map:</strong><br/>
		  <div class="sBoxAbs"><?=$mapnamelong?></div></td>
       </tr>
      </table>
     </td>
    </tr>
   </table>
<?
}
?>


ToM

__________________

Nightwing ist offline E-Mail an Nightwing senden Homepage von Nightwing Beiträge von Nightwing suchen Nehmen Sie Nightwing in Ihre Freundesliste auf
Dungeonwatcher
Hat kein Zuhause


Dabei seit: 22.01.2008
Beiträge: 76


traurig Auf diesen Beitrag antworten Zitatantwort auf diesen Beitrag erstellen Diesen Beitrag editieren/löschen Diesen Beitrag einem Moderator melden       Zum Anfang der Seite springen

Hi! cool

Zitat:

Original von Nightwing
Ich nutze modifizierte Livestats:


Dito.

Es wurde anscheinend bei der Abfrage des Servers per udp etwas "versaut". Ändere ich nämlich:

Code einblendenCode angehängt. Klicke hier zum Ein-/Ausblenden

code:
1:
$server_ip = "udp://$a[0]";


in

Code einblendenCode angehängt. Klicke hier zum Ein-/Ausblenden

code:
1:
$server_ip = "$a[0]";



dann wird der Server zumindest nicht mehr als "offline" angezeigt. Allerdings fehlen immer noch sämtlichen anderen Parameter wie "Version, Spieltyp, etc.". Keinen Plan?

Wie kann ich unter XP händisch per udp den Server abfragen und eine entsprechende Log Datei erzeugen?

Bye

Dieser Beitrag wurde 2 mal editiert, zum letzten Mal von Dungeonwatcher: 19.07.2009 13:07.

Dungeonwatcher ist offline Homepage von Dungeonwatcher Beiträge von Dungeonwatcher suchen Nehmen Sie Dungeonwatcher in Ihre Freundesliste auf
Kelli
... sehr viel alleine


Dabei seit: 09.11.2006
Beiträge: 2.504


Auf diesen Beitrag antworten Zitatantwort auf diesen Beitrag erstellen Diesen Beitrag editieren/löschen Diesen Beitrag einem Moderator melden       Zum Anfang der Seite springen

Der hier?
kellerkind@ubuntu:~$ printf "\xFF\xFF\xFF\xFFgetstatus\n" |nc -uw 10 78.143.44.221 28960
statusResponse
\_Admin\Olle Otze\_Email\olleotze [at] hellzone-am [dot] de\_Location\Germany\_Maps\CoD 5 Stock Maps\_Website\http://www.HellZone-AM.de\fxfrustumCutof...m\gamename\Call of Duty: World at War\gamestartup\07/18/2009 20:54:06\mapname\mp_airfield\penetrationCount\5\protocol\99\shortversion\1\
sv_allowAnonymous\0\sv_disableClientConsole\1\sv_floodprotect\1\sv_hostname
\ ^9=>^108^9/^415^9<=\sv_maxclients\22\sv_maxPing\150\sv_maxRate\25000\sv_min
Ping\0\sv_privateClients\2\sv_punkbuster\1\sv_pure\1\sv_voice\0\ui_maxclien
ts\32\pswrd\0\mod\0

Sieht doch gesund aus.

Zitat:

Original von Dungeonwatcher

Code einblendenCode angehängt. Klicke hier zum Ein-/Ausblenden

code:
1:
$server_ip = "udp://$a[0]";


in

Code einblendenCode angehängt. Klicke hier zum Ein-/Ausblenden

code:
1:
$server_ip = "$a[0]";



dann wird der Server zumindest nicht mehr als "offline" angezeigt. Allerdings fehlen immer noch sämtlichen anderen Parameter wie "Version, Spieltyp,

Quatsch. Wenn du das Protokoll bei fsockopen() weglässt wird tcp benutzt. Da lauscht *afair* der Punkbuster auf Befehle.
if ($connect)
{
}
ist also True.
Aber da wird kein Status bei rauskommen.

PS und *SCNR*:
$serverip = substr($server_ip, 6); == $serverip = $a[0];
Augen rollen

PPS: @Nightwing Auf der dir bekannten Beta Seite zeigt der dir bekannte Beta-Serverbrowser alle Daten richtig an. (dev..... )

__________________
„ Allah ist Groß, und wir sind armselige Tröpfe mit unseren ganzen Wissenschaften Herrlichkeit.“

Dieser Beitrag wurde 420 mal editiert, zum letzten Mal von der Bundesregierung Niemand: Heute, 11:42.

https://kkde.de/scum/
Kelli ist offline Homepage von Kelli Beiträge von Kelli suchen Nehmen Sie Kelli in Ihre Freundesliste auf
Nightwing
Padawan ;-)


images/avatars/avatar-1617.jpg


Dabei seit: 15.01.2007
Beiträge: 4.858


Auf diesen Beitrag antworten Zitatantwort auf diesen Beitrag erstellen Diesen Beitrag editieren/löschen Diesen Beitrag einem Moderator melden       Zum Anfang der Seite springen

Zitat:

Original von Kellerkind

Sieht doch gesund aus.

So gesund sieht das bei mir nicht aus: Klick
Auch die NavBoxen zeigen nix an...
Ich hab keine Ahnung, was nun an 1.5 anders sein soll ?!?

ToM

PS:

Zitat:

Original von Kellerkind

PPS: @Nightwing Auf der dir bekannten Beta Seite zeigt der dir bekannte Beta-Serverbrowser alle Daten richtig an. (dev..... )

Hab ich gestern auch geschaut, allerdings hast Du da bestimmt auch was dran rumgepfriemelt Zunge raus
Nur: WAS?

__________________

Nightwing ist offline E-Mail an Nightwing senden Homepage von Nightwing Beiträge von Nightwing suchen Nehmen Sie Nightwing in Ihre Freundesliste auf
Dungeonwatcher
Hat kein Zuhause


Dabei seit: 22.01.2008
Beiträge: 76


Auf diesen Beitrag antworten Zitatantwort auf diesen Beitrag erstellen Diesen Beitrag editieren/löschen Diesen Beitrag einem Moderator melden       Zum Anfang der Seite springen

Zitat:

Original von Kellerkind
Quatsch. Wenn du das Protokoll bei fsockopen() weglässt wird tcp benutzt. Da lauscht *afair* der Punkbuster auf Befehle.
if ($connect)
{
}
ist also True.
Aber da wird kein Status bei rauskommen.


Stimmt natürlich.

PHP gibt mir übrigens folgende Fehlermeldung:

Zitat:

PHP Warning: fsockopen(): unable to connect to 91.67.226.97:28968 (Ein Verbindungsversuch ist fehlgeschlagen, da die Gegenstelle nach einer bestimmten Zeitspanne nicht ordnungsgemäß reagiert hat, oder die hergestellte Verbindung war fehlerhaft, da der verbundene Host nicht reagiert hat


Wie schon geschrieben, diese Abfrage funktioniert bis zur Version 1.4.1 und auch bei allen anderen CoD Versionen bestens. Was also ist in Version 1.5 jetzt anders?
Dungeonwatcher ist offline Homepage von Dungeonwatcher Beiträge von Dungeonwatcher suchen Nehmen Sie Dungeonwatcher in Ihre Freundesliste auf
Kelli
... sehr viel alleine


Dabei seit: 09.11.2006
Beiträge: 2.504


Auf diesen Beitrag antworten Zitatantwort auf diesen Beitrag erstellen Diesen Beitrag editieren/löschen Diesen Beitrag einem Moderator melden       Zum Anfang der Seite springen

Ändere mal bitte
$send = "ÿÿÿÿ" . chr (0x02) . "getstatus";
in
$send = "ÿÿÿÿgetstatus\n";
bzw
$send = "" . chr(0xff).chr(0xff).chr(0xff).chr(0xff) . "getstatus\n";
don´t ask....
ist halt so.
Das "begin of data oxo2" ist nicht unbedingt notwendig. CodX < CoD5 1.5 wars egal ab 1.5 gehts offensichtlich nicht mehr (gerade getestet)

__________________
„ Allah ist Groß, und wir sind armselige Tröpfe mit unseren ganzen Wissenschaften Herrlichkeit.“

Dieser Beitrag wurde 420 mal editiert, zum letzten Mal von der Bundesregierung Niemand: Heute, 11:42.

https://kkde.de/scum/
Kelli ist offline Homepage von Kelli Beiträge von Kelli suchen Nehmen Sie Kelli in Ihre Freundesliste auf
Nightwing
Padawan ;-)


images/avatars/avatar-1617.jpg


Dabei seit: 15.01.2007
Beiträge: 4.858


Auf diesen Beitrag antworten Zitatantwort auf diesen Beitrag erstellen Diesen Beitrag editieren/löschen Diesen Beitrag einem Moderator melden       Zum Anfang der Seite springen

Zitat:

Original von Kellerkind

Ändere mal bitte
$send = "ÿÿÿÿ" . chr (0x02) . "getstatus";
in
$send = "ÿÿÿÿgetstatus\n";

Bingo, es funktioniert. Vielen Dank! Grins 1

ToM

__________________

Nightwing ist offline E-Mail an Nightwing senden Homepage von Nightwing Beiträge von Nightwing suchen Nehmen Sie Nightwing in Ihre Freundesliste auf
Dungeonwatcher
Hat kein Zuhause


Dabei seit: 22.01.2008
Beiträge: 76


Auf diesen Beitrag antworten Zitatantwort auf diesen Beitrag erstellen Diesen Beitrag editieren/löschen Diesen Beitrag einem Moderator melden       Zum Anfang der Seite springen

Moin! cool

Zitat:

Original von Kellerkind

Ändere mal bitte
$send = "ÿÿÿÿ" . chr (0x02) . "getstatus";
in
$send = "ÿÿÿÿgetstatus\n";


Perfekt. Grins 1

Bye
Dungeonwatcher ist offline Homepage von Dungeonwatcher Beiträge von Dungeonwatcher suchen Nehmen Sie Dungeonwatcher in Ihre Freundesliste auf
Baumstruktur | Brettstruktur
Gehe zu:
Neues Thema erstellen Antwort erstellen
Opferlamm-Clan Board » Call of Duty: World at War » Call of Duty: World at War - Hilfe » [gelöst] Patch 1.5 und fehlerhaftes Auslesen per UDP

Impressum ||Datenschutzerklärung

Forensoftware: Wbb - WoltLab GmbH || zum Archiv