Cannot use Rcon from PHP script - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Cannot use Rcon from PHP script (
/showthread.php?tid=608104)
Cannot use Rcon from PHP script -
Kemula - 27.05.2016
Hello. Today I've trying to use RCON from a PHP script. I've used Westie's php class.
I don't know what am I doing wrong. Cannot do it from Windows nor Linux. I've sockets extension enabled, and I've verified that the password is correct. The IP too.
In the server logs, there isn't any logs about trying to connect Rcon and things like that.
My PHP script:
PHP код:
require('./SampRconAPI.php');
$rcon = new SampRconAPI('XXXXX', 7777, 'XXXXX');
$rcon->adminSay('Hello');
What can I do?
Re: Cannot use Rcon from PHP script -
SecretBoss - 27.05.2016
Change
Код:
require('./SampRconAPI.php');
to
Код:
require('../SampRconAPI.php');
Check again where is the SampRconAPI.php file
Respuesta: Re: Cannot use Rcon from PHP script -
Kemula - 27.05.2016
The file is in the same directory. I think that class works correctly, but the problem is when connecting to my server. Thanks.
Respuesta: Cannot use Rcon from PHP script -
Kemula - 27.05.2016
I've used it on another dedicated server and now it's working! Solved.