SRCDS Steam group


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need a PHP class to check RCON for cs1.6
#16
ok, phprcon worked in local perfectly, and then due to this error happening ONLY on the web :
Code:
Warning: fread() [function.fread]: Length parameter must be greater than 0 in /homez.136/gamercer/www/test/rcon_hl_net.php on line 367

so i'm rolling back to your php class, but i really can't this thing to work :

PHP Code:
Unable to open socket: () 

plus, why should i add the PORT here :
PHP Code:
class RCon {  
var 
$Password  ;  
var 
$Host ;  
var 
$Port 27175;   // HERE
var $_Sock null;  
var 
$_Id 0

if i already have it here:
PHP Code:
<?php
include ('rcon.php');
$r = new RCon("94.23.26.185",27175,"gamer-certified");   // Here
$r->Auth();  
echo 
"Authenticated\n";   
?>

Thx 4 your future help.
Reply
#17
Your web host doesnt allow socket connections, most of the cheapo unlimited everything providers wont allow them unless you buy an IP address.
Looking for a game server? Visit fullfrag.com and pick one up as low as $2.50 / mo!
Reply
#18
of course it does support it !

i run a similar PHP class for SOURCE ENGINE games and it works perfectly

PHP Code:
function rcon_command($ip$port$password)
        {
            
$ip $_POST["ip"];
            
$port $_POST["port"];
            
$password $_POST["rcon"];
            
$requestId 1;
            
$s2 '';
            
$socket = @fsockopen ('tcp://'.$ip$port$errno$errstr15);
            if (!
$socket)
                return 
0;
            
$data pack("VV"$requestIdSERVERDATA_AUTH).$password.chr(0).$s2.chr(0);
            
$data pack("V",strlen($data)).$data;        
            
fwrite ($socket$datastrlen($data));
................ 

the only obvious difference between the 2 RCON CLASS is one is using UDP:// and the other TCP://
Reply
#19
ok, it's my HOSTER who authorizes socket in TCP mod but not in UDP mod

is there any way to get this script working with a TCP method please ?
Reply
#20
(01-07-2010, 06:39 AM)Iseult Wrote:  is there any way to get this script working with a TCP method please ?

hlds uses UDP for RCON, IIRC. no way to change this.
http://www.fpsmeter.org
http://wiki.fragaholics.de/index.php/EN:Linux_Optimization_Guide (Linux Kernel HOWTO!)
Do not ask technical questions via PM!
Reply
#21
ok, thanks behaartes
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)