felixms / arma-rcon-class-php

A lightweight client for sending commands easily to a BattlEye server.
MIT License
46 stars 22 forks source link

Can't connect. Always get Login error #43

Closed KeksKartoffel closed 4 years ago

KeksKartoffel commented 4 years ago

If I establish a connection as in the readme, I only get the error: "Ups! Something went wrong: Login failed, wrong password or wrong port!" Although the port and password must be correct. I already tested the whole RCON connection with the BattleEye "BERCon" client for Windows. There I have no connection problems, everything works. I only get the error here.

Tested Code:

use \Nizarii\ARC;

require_once "app/arc.php";

try {
    $rcon = new ARC('IP', 'Password', 2309);

    $array = $rcon->getPlayersArray();

    $rcon
        ->sayGlobal('example')
        ->kickPlayer(1, 'example')
        ->sayPlayer(0, 'example')
        ->disconnect()
    ;

    $rcon->getBans();
} catch (Exception $e) {
    echo "Ups! Something went wrong: {$e->getMessage()}";
}

Would be nice if you can help me :)