AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Snippets and Tutorials (https://forums.alliedmods.net/forumdisplay.php?f=112)
-   -   PHP RCON (https://forums.alliedmods.net/showthread.php?t=251009)

KissLick 11-03-2014 17:26

PHP RCON
 
Ciao guys,

I searched for an easy way, how to send rcon command to my server via php and I ended up using this php class from SourceBans.

SNIPPET:
PHP Code:

<?php
require_once("ServerRcon.php");

define('SERVER_IP''127.0.0.1');
define('SERVER_PORT''27015');
define('SERVER_RCON''rconpassword');

/* ----- */

$rcon = new ServerRcon(SERVER_IPSERVER_PORTSERVER_RCON);

if (!
$rcon->auth()) {
    exit(
"fail");
}

echo 
nl2br($rcon->execute("status"));
?>

Cheers! :-)

guipatinador 11-13-2014 06:47

Re: PHP RCON
 
Source Query Class from xPaw it's pretty simple. https://github.com/xPaw/PHP-Source-Q...conExample.php

eric0279 11-17-2014 01:43

Re: PHP RCON
 
http://www.ruckman.net./downloads-1

zakke221298 01-26-2015 14:24

Re: PHP RCON
 
The ruckman and Source Query Class from xPaw is not working ??

eric0279 01-27-2015 06:06

Re: PHP RCON
 
work 100%

zakke221298 01-28-2015 13:50

Re: PHP RCON
 
How can i edit Source Query Class so it can get ip, port and rcon from mysql ?

WildCard65 01-28-2015 14:27

Re: PHP RCON
 
Quote:

Originally Posted by zakke221298 (Post 2255508)
How can i edit Source Query Class so it can get ip, port and rcon from mysql ?

OR

You can just fetch those in a php file you write then pass them to SourceQuery without editting it.


All times are GMT -4. The time now is 23:22.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.