Game server admin's helping the community setup and maintain great dedicated game servers.
----Home----Submit News ----Forum--------Guides----


Go Back   FPSadmin.com > BattleField > Bad Company 2 > BC2: Remote Admin Tool Support

Reply
 
Thread Tools Display Modes
  #16  
Old 04-04-2010, 06:34 PM
Fritz.fx Fritz.fx is offline
Junior Member
 
Join Date: Apr 2010
Posts: 3
Rep Power: 0
Fritz.fx is on a distinguished road
This is great stuff, thanks for sharing.
I'm in the middle of using your class to write a web-based admin page for the server. except I'm getting stuck on something.

To display the maplist I'm using this:
PHP Code:
$arr = array($BC2Conn->adminGetMaplist());
foreach(
$arr as $value) {
 foreach(
$value as $key => $val) {
        echo 
"$val<br />";
   }

Which gets me exactly what I want:
Quote:
Levels/MP_001
Levels/MP_003
Levels/MP_005
Levels/MP_006CQ
Levels/MP_007
Levels/MP_009CQ
The problem is, It changes the gametype to Conquest, everytime.
Is it a possible bug, or is it just me?
Reply With Quote
  #17  
Old 04-04-2010, 10:34 PM
spacepig spacepig is offline
Junior Member
 
Join Date: Mar 2010
Location: Ann Arbor, MI
Age: 45
Posts: 29
Rep Power: 0
spacepig is on a distinguished road
atleast 2 of your maps are conquest maps.
So unless your running conquest you would not get a return, looks like you were allready running conquest.
Reply With Quote
  #18  
Old 04-04-2010, 10:43 PM
Fritz.fx Fritz.fx is offline
Junior Member
 
Join Date: Apr 2010
Posts: 3
Rep Power: 0
Fritz.fx is on a distinguished road
Ah yes, your right.
That was my problem, I was changing the gametype without creating or changing the maplist.

All fixed now, thanks.
Reply With Quote
  #19  
Old 04-05-2010, 02:41 PM
JLNNN's Avatar
JLNNN JLNNN is offline
Member
 
Join Date: Mar 2010
Location: Germany
Age: 29
Posts: 39
Rep Power: 0
JLNNN is on a distinguished road
Updated to v1.5b.
__________________
BC2Conn - PHP class for communicating with a Battlefield Bad Company 2 gameserver
Reply With Quote
  #20  
Old 04-07-2010, 02:11 PM
R[wc]BADFISH R[wc]BADFISH is offline
Junior Member
 
Join Date: Apr 2010
Posts: 6
Rep Power: 0
R[wc]BADFISH is on a distinguished road
JLNNN, very interested in deploying this for our admin/rcon teams. However, when I test it with the example.php file and our server information I keep getting errors.

Server IP: 63.215.74.135
Port: 19567/48888

Quote:
Warning: fsockopen() [function.fsockopen]: unable to connect to tcp://63.215.74.135:19567 (Connection refused) in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 263

Warning: fwrite(): supplied argument is not a valid stream resource in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 278

Warning: fread(): supplied argument is not a valid stream resource in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 279

Warning: unpack() [function.unpack]: Type I: not enough input, need 4, have 0 in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 80

Warning: unpack() [function.unpack]: Type I: not enough input, need 4, have 0 in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 94

Warning: unpack() [function.unpack]: Type I: not enough input, need 4, have 0 in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 94

Warning: fwrite(): supplied argument is not a valid stream resource in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 278

Warning: fread(): supplied argument is not a valid stream resource in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 279

Warning: unpack() [function.unpack]: Type I: not enough input, need 4, have 0 in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 80

Warning: unpack() [function.unpack]: Type I: not enough input, need 4, have 0 in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 94

Warning: unpack() [function.unpack]: Type I: not enough input, need 4, have 0 in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 94
63.215.74.135

Warning: fwrite(): supplied argument is not a valid stream resource in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 278

Warning: fread(): supplied argument is not a valid stream resource in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 279

Warning: unpack() [function.unpack]: Type I: not enough input, need 4, have 0 in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 80

Warning: unpack() [function.unpack]: Type I: not enough input, need 4, have 0 in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 94

Warning: unpack() [function.unpack]: Type I: not enough input, need 4, have 0 in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 94


Warning: fwrite(): supplied argument is not a valid stream resource in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 278

Warning: fread(): supplied argument is not a valid stream resource in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 279

Warning: unpack() [function.unpack]: Type I: not enough input, need 4, have 0 in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 80

Warning: unpack() [function.unpack]: Type I: not enough input, need 4, have 0 in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 94

Warning: unpack() [function.unpack]: Type I: not enough input, need 4, have 0 in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 94


Warning: fwrite(): supplied argument is not a valid stream resource in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 278

Warning: fread(): supplied argument is not a valid stream resource in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 279

Warning: unpack() [function.unpack]: Type I: not enough input, need 4, have 0 in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 80

Warning: unpack() [function.unpack]: Type I: not enough input, need 4, have 0 in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 94

Warning: unpack() [function.unpack]: Type I: not enough input, need 4, have 0 in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 94


Warning: fwrite(): supplied argument is not a valid stream resource in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 278

Warning: fread(): supplied argument is not a valid stream resource in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 279

Warning: unpack() [function.unpack]: Type I: not enough input, need 4, have 0 in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 80

Warning: unpack() [function.unpack]: Type I: not enough input, need 4, have 0 in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 94

Warning: unpack() [function.unpack]: Type I: not enough input, need 4, have 0 in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 94

Warning: simplexml_load_file() [function.simplexml-load-file]: I/O warning : failed to load external entity "playModes.xml" in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 356


Warning: fwrite(): supplied argument is not a valid stream resource in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 278

Warning: fread(): supplied argument is not a valid stream resource in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 279

Warning: unpack() [function.unpack]: Type I: not enough input, need 4, have 0 in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 80

Warning: unpack() [function.unpack]: Type I: not enough input, need 4, have 0 in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 94

Warning: unpack() [function.unpack]: Type I: not enough input, need 4, have 0 in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 94

Warning: simplexml_load_file() [function.simplexml-load-file]: I/O warning : failed to load external entity "mapNames.xml" in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 337


Warning: fwrite(): supplied argument is not a valid stream resource in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 278

Warning: fread(): supplied argument is not a valid stream resource in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 279

Warning: unpack() [function.unpack]: Type I: not enough input, need 4, have 0 in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 80

Warning: unpack() [function.unpack]: Type I: not enough input, need 4, have 0 in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 94

Warning: unpack() [function.unpack]: Type I: not enough input, need 4, have 0 in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 94
Reply With Quote
  #21  
Old 04-07-2010, 03:32 PM
JLNNN's Avatar
JLNNN JLNNN is offline
Member
 
Join Date: Mar 2010
Location: Germany
Age: 29
Posts: 39
Rep Power: 0
JLNNN is on a distinguished road
Hi R[wc]BADFISH,

is fsockopen() allowed on your webspace? If not, is it possible that you try another provider?

- JLNNN
__________________
BC2Conn - PHP class for communicating with a Battlefield Bad Company 2 gameserver
Reply With Quote
  #22  
Old 04-07-2010, 08:12 PM
R[wc]BADFISH R[wc]BADFISH is offline
Junior Member
 
Join Date: Apr 2010
Posts: 6
Rep Power: 0
R[wc]BADFISH is on a distinguished road
Yeah, it looks like go daddy allows fsockopen.

http://help.godaddy.com/topic/418/article/287

Okay, changed the port to 80 which has cleared the connection error but I'm still having issues!

Quote:
Warning: unpack() [function.unpack]: Type I: not enough input, need 4, have 0 in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 80

Warning: unpack() [function.unpack]: Type I: not enough input, need 4, have 0 in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 94

Warning: unpack() [function.unpack]: Type I: not enough input, need 4, have 0 in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 94
63.215.74.135

Warning: unpack() [function.unpack]: Type I: not enough input, need 4, have 0 in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 80

Warning: unpack() [function.unpack]: Type I: not enough input, need 4, have 0 in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 94

Warning: unpack() [function.unpack]: Type I: not enough input, need 4, have 0 in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 94


Warning: unpack() [function.unpack]: Type I: not enough input, need 4, have 0 in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 80

Warning: unpack() [function.unpack]: Type I: not enough input, need 4, have 0 in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 94

Warning: unpack() [function.unpack]: Type I: not enough input, need 4, have 0 in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 94


Warning: unpack() [function.unpack]: Type I: not enough input, need 4, have 0 in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 80

Warning: unpack() [function.unpack]: Type I: not enough input, need 4, have 0 in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 94

Warning: unpack() [function.unpack]: Type I: not enough input, need 4, have 0 in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 94


Warning: unpack() [function.unpack]: Type I: not enough input, need 4, have 0 in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 80

Warning: unpack() [function.unpack]: Type I: not enough input, need 4, have 0 in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 94

Warning: unpack() [function.unpack]: Type I: not enough input, need 4, have 0 in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 94


Warning: unpack() [function.unpack]: Type I: not enough input, need 4, have 0 in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 80

Warning: unpack() [function.unpack]: Type I: not enough input, need 4, have 0 in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 94

Warning: unpack() [function.unpack]: Type I: not enough input, need 4, have 0 in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 94


Warning: unpack() [function.unpack]: Type I: not enough input, need 4, have 0 in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 80

Warning: unpack() [function.unpack]: Type I: not enough input, need 4, have 0 in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 94

Warning: unpack() [function.unpack]: Type I: not enough input, need 4, have 0 in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 94

Warning: unpack() [function.unpack]: Type I: not enough input, need 4, have 0 in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 80

Warning: unpack() [function.unpack]: Type I: not enough input, need 4, have 0 in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 94

Warning: unpack() [function.unpack]: Type I: not enough input, need 4, have 0 in /home/content/r/w/c/rwcadmin/html/rwc/BC2Conn.php on line 94

Last edited by R[wc]BADFISH; 04-07-2010 at 08:17 PM.
Reply With Quote
  #23  
Old 04-07-2010, 08:46 PM
Xaiin Xaiin is offline
Junior Member
 
Join Date: Apr 2010
Posts: 2
Rep Power: 0
Xaiin is on a distinguished road
Yeh that wont work, means your trying to connect to port 80 on your game server which wont give you the server query info you need. As correctly identified you need to be on 48888.

However from that post it appears GoDaddy only support the 2 common ports (80 standard web, 443 ssl web). Looks like you need a new host or some sort of bouncer.



The rest of the errors will be becuase of no valid connection to a BFBC2 query server/port.
Reply With Quote
  #24  
Old 04-08-2010, 02:46 AM
JLNNN's Avatar
JLNNN JLNNN is offline
Member
 
Join Date: Mar 2010
Location: Germany
Age: 29
Posts: 39
Rep Power: 0
JLNNN is on a distinguished road
Hey guys,

no changelog to post this time, but another great news:

BC2Conn has got it's own message board now!

Visit it here: BC2Conn Message Board

You'll find news, update notes, changelogs and community projects including BC2Conn there.

- JLNNN
__________________
BC2Conn - PHP class for communicating with a Battlefield Bad Company 2 gameserver
Reply With Quote
  #25  
Old 04-08-2010, 02:47 PM
R[wc]BADFISH R[wc]BADFISH is offline
Junior Member
 
Join Date: Apr 2010
Posts: 6
Rep Power: 0
R[wc]BADFISH is on a distinguished road
Okay, I setup another hosting account but still not working correctly. All it display's is the server IP address.

http://rwcadmin.byethost31.com/
Reply With Quote
  #26  
Old 04-08-2010, 02:50 PM
JLNNN's Avatar
JLNNN JLNNN is offline
Member
 
Join Date: Mar 2010
Location: Germany
Age: 29
Posts: 39
Rep Power: 0
JLNNN is on a distinguished road
Try the following in the first lines of your PHP script:

PHP Code:
<?php
error_reporting
(E_ALL);

/*
        your php code
*/

?>
And do you use

PHP Code:
print_r($BC2Conn->function()); 
for debugging?
__________________
BC2Conn - PHP class for communicating with a Battlefield Bad Company 2 gameserver
Reply With Quote
  #27  
Old 04-09-2010, 10:39 AM
JLNNN's Avatar
JLNNN JLNNN is offline
Member
 
Join Date: Mar 2010
Location: Germany
Age: 29
Posts: 39
Rep Power: 0
JLNNN is on a distinguished road
Updated to server version R9 - many new features!

You'll find the changelog in the first post or at the official project site.

Have fun!

- JLNNN
__________________
BC2Conn - PHP class for communicating with a Battlefield Bad Company 2 gameserver
Reply With Quote
  #28  
Old 04-11-2010, 12:32 PM
JLNNN's Avatar
JLNNN JLNNN is offline
Member
 
Join Date: Mar 2010
Location: Germany
Age: 29
Posts: 39
Rep Power: 0
JLNNN is on a distinguished road
Updated to v1.01.

Most important change: Fixed bug with receiving data from gameserver > 4096 bytes. Check out the first post for more information.
__________________
BC2Conn - PHP class for communicating with a Battlefield Bad Company 2 gameserver
Reply With Quote
  #29  
Old 04-14-2010, 03:06 PM
JLNNN's Avatar
JLNNN JLNNN is offline
Member
 
Join Date: Mar 2010
Location: Germany
Age: 29
Posts: 39
Rep Power: 0
JLNNN is on a distinguished road
Updated to v1.02.
__________________
BC2Conn - PHP class for communicating with a Battlefield Bad Company 2 gameserver
Reply With Quote
  #30  
Old 04-23-2010, 08:20 PM
JLNNN's Avatar
JLNNN JLNNN is offline
Member
 
Join Date: Mar 2010
Location: Germany
Age: 29
Posts: 39
Rep Power: 0
JLNNN is on a distinguished road
Updated to v1.03. See first post for changelog.
__________________
BC2Conn - PHP class for communicating with a Battlefield Bad Company 2 gameserver
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:42 PM.


Powered by: vBulletin Copyright ©2000, Jelsoft Enterprises Ltd.