Closed sciamachy closed 4 years ago
The Login Method has changed for post-v6.43. See https://wiki.mikrotik.com/wiki/Manual:API.
The following modification to the connect() function in routeros_api.class.php will resolve this (though break backwards compatibility). May make sense to either try both, or have the user config the version.
$this->write('/login'); $this->write('=name=' . $login, false); $this->write('=password=' . $password, false); $RESPONSE = $this->read(false); if (isset($RESPONSE[0]) && $RESPONSE[0] == '!done') { $this->connected = true; break; }
Hello Dear cigamit,
I have same problem, User logged in/logged out by API
We updated the API some time ago to address this.
The Login Method has changed for post-v6.43. See https://wiki.mikrotik.com/wiki/Manual:API.
The following modification to the connect() function in routeros_api.class.php will resolve this (though break backwards compatibility). May make sense to either try both, or have the user config the version.
$this->write('/login'); $this->write('=name=' . $login, false); $this->write('=password=' . $password, false); $RESPONSE = $this->read(false); if (isset($RESPONSE[0]) && $RESPONSE[0] == '!done') { $this->connected = true; break; }