SteVader Posted September 29, 2004 Share Posted September 29, 2004 Originally posted by LoRdNaTaS I have been working on a script for PHP but in my testing the connection just hangs. PHP finally times out but it does not retreive any info from the server. I have put that on the side for right now and am in the process of creating a stats system. I might get back to working in a week or so. That's a shame - I have been watching this thread anticipating a PHP script... ah well I guess it will come in time.... Link to comment Share on other sites More sharing options...
LoRdNaTaS Posted September 29, 2004 Share Posted September 29, 2004 Sorry for the disappointment... I will get back to I promise. But I want stats first.. I know I am a greedy bastard... Sorry Link to comment Share on other sites More sharing options...
KaeseGewitter Posted October 2, 2004 Share Posted October 2, 2004 I GOT IT. Jeah I have finished my work at the server state script: GO THIS WAY Link to comment Share on other sites More sharing options...
LoRdNaTaS Posted October 2, 2004 Share Posted October 2, 2004 I like it but it seems that your link to sever1 is having issues but the server2 link seems fine. Link to comment Share on other sites More sharing options...
KaeseGewitter Posted October 2, 2004 Share Posted October 2, 2004 sometimes the link works and sometimes not. I think it is, when the server is changin his map. Link to comment Share on other sites More sharing options...
LoRdNaTaS Posted October 2, 2004 Share Posted October 2, 2004 hey KaeseGewitter drop me a line I want to ask you some questions on your script.. natas@apocalypce.net Link to comment Share on other sites More sharing options...
[RNGD]Tyrant Posted October 2, 2004 Share Posted October 2, 2004 Originally posted by KaeseGewitter I GOT IT. Jeah I have finished my work at the server state script: GO THIS WAY nice work. is this a modified version of the other script or your own? are you offering a download for people? Link to comment Share on other sites More sharing options...
KaeseGewitter Posted October 2, 2004 Share Posted October 2, 2004 thx, its my own work. So far I know are no other PHP Scripts for Battlefront Server avaible. Soon, there will be a download able version. Link to comment Share on other sites More sharing options...
KaeseGewitter Posted October 3, 2004 Share Posted October 3, 2004 Now there is a download able Version avaible: press here Link to comment Share on other sites More sharing options...
vwjoker Posted October 4, 2004 Share Posted October 4, 2004 Many thanks for the php script KaeseGewitter! Works a treat, had to do a little bit of fiddling, but seems to work fine... as my webserver (abyss) sits on the game server, I just use 127.0.0.1 (stops the darn thing timing out). I'm also using a cut down version of PHP, so I cant throttle PHP Notice messages so I changed this line :- if ($bytes_left['unread_bytes'] > 0) { $buf = fread($fp, $bytes_left['unread_bytes']); } Just to define the 'unread_bytes', for anyone else who may have problems with it. Danke Schone! Link to comment Share on other sites More sharing options...
KaeseGewitter Posted October 4, 2004 Share Posted October 4, 2004 Hi, great to see, that the script is working. But I wouldn't definde 'unread_bytes' because you don't know, how long the message ist, which the server sends to you, so if the message is longer then the defined value, you may have a problem. Link to comment Share on other sites More sharing options...
vwjoker Posted October 4, 2004 Share Posted October 4, 2004 ah, I wasnt too sure what putting the ' ' marks around it did. I figured it was a generic sort of define (like cast) method, and wouldnt affect its length. So um... outta my depth already, it defines the type, and not the length? Hey, its been a few years since I have bothered to code... I vowed never to code again, and star wars has forced me back into it. .... mumbles something about dark side and succumbing ... My Effort Link to comment Share on other sites More sharing options...
KaeseGewitter Posted October 4, 2004 Share Posted October 4, 2004 sorry, I didn't understood you right, I thought you wrote something like this: define unread_bytes = 1024; So it was my fault, sry. Perhaps you should build a small design around my Script. just make a index.php (or any other name). Put into this index.php your HTML Code and then write this: <? include("status.php"); ?> at the point, where my script should be shown. Link to comment Share on other sites More sharing options...
[SYN]~slinky~ Posted October 4, 2004 Share Posted October 4, 2004 Hi Guys - I've been lurking here watching the great work you guys are doing. But I do have a question: is there a reason you guys don't have the Heros On/Off data, and number of bots info displayed? Link to comment Share on other sites More sharing options...
KaeseGewitter Posted October 4, 2004 Share Posted October 4, 2004 the server doesn't send every information back. So you doesn't get the information, if Hereos are on/off, or if there are Bots, etc. Link to comment Share on other sites More sharing options...
[SYN]~slinky~ Posted October 4, 2004 Share Posted October 4, 2004 Then how does my client know how to display this info? Sorry if this is a noob question, if it is, I'll shut up... Link to comment Share on other sites More sharing options...
vwjoker Posted October 4, 2004 Share Posted October 4, 2004 In terms of the part of the script that sorts out which side is which, I've had a look and they dont always seem to tally. ie the game may be rebels vs imperials, but Confederation / Republic would be showing. So I just changed the code to this. echo("<table width='600'><tr><td colspan=4><b>"); # Display "goodies" echo($array[$ber2+4]); echo (" - ".$array[$ber2+5]); echo("</b></td><td colspan=4><b>"); # Display "badies" echo($array[$ber2+6]); echo (" - ".$array[$ber2+7]); echo("</b></td></tr>"); Link to comment Share on other sites More sharing options...
DNACowboy Posted October 4, 2004 Author Share Posted October 4, 2004 yea i still haven't figured out what the end team info is. team_t and score_t are always the same.. REBEL or EMPIRE and the score_t is always 10 and 15.. i believe this may have been the Galactic Conquest feature they where going to put in (where score carried over from round to round).. right now it is only good for determining the player set, GCW vs Republic.. Link to comment Share on other sites More sharing options...
LoRdNaTaS Posted October 4, 2004 Share Posted October 4, 2004 the only thing I have found the team_t is good for is determining the game type. If Rebels & Empire then you are playing episode 4 - 6 If Rebulic and CIS then you are playing episode 1 - 3 But the score_t seems to have no use as of yet due to it never changes. I though it might be the ticket count but it seems that it is not. Link to comment Share on other sites More sharing options...
vwjoker Posted October 5, 2004 Share Posted October 5, 2004 Just a quick question, how did anyone figure out what HEX codes to send to the server to query it? $send = pack("H*", "FE"); $send .= pack("H*", "FD"); $send .= pack("H*", "00"); $send .= pack("H*", "04"); $send .= pack("H*", "05"); $send .= pack("H*", "06"); $send .= pack("H*", "07"); $send .= pack("H*", "FF"); $send .= pack("H*", "FF"); $send .= pack("H*", "FF"); ... am just wondering if it responds to other HEX queries or not, y'see. _edit_ Having engaged brain, I realised this must be the UDP query format. heh Link to comment Share on other sites More sharing options...
DNACowboy Posted October 5, 2004 Author Share Posted October 5, 2004 it is the new standard gamespy query package.. before you sent simple text like $socket->send("/status/"); instead they changed it to this hex string... Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.