send in initial login message
/login
=name=user
=password=xxx
Thanks for your fast response, however I'm still stuck. Getting the same login failure.
My current login method is:
function connect($ip, $login, $password) {
for ($ATTEMPT = 1; $ATTEMPT <= $this->attempts; $ATTEMPT++) {
$this->connected = false;
$this->debug('Connection attempt #' . $ATTEMPT . ' to ' . $ip . ':' . $this->port . '...');
if ($this->socket = @fsockopen($ip, $this->port, $this->error_no, $this->error_str, $this->timeout) ) {
socket_set_timeout($this->socket, $this->timeout);
$this->write('/login');
$this->write('=name=' . $login);
$this->write('=password=' . $password);
$RESPONSE = $this->read(false);
if ($RESPONSE[0] == '!done') {
$this->connected = true;
break;
}
fclose($this->socket);
}
sleep($this->delay);
}
if ($this->connected)
$this->debug('Connected...');
else
$this->debug('Error...');
return $this->connected;
}