Hi, I would like to create an API that executes a command within the mikrotik, which is not how the php file would be to directly send the command to the mikrotik that I can not find by any side this / ip dhcp-client release 0. This api that I show when I run it from the web server appears an error.
<?php
require('routeros_api.class.php');
$API = new routeros_api();
$API->debug = true;
if ($API->connect('192.168.17.135', 'api', 'api')) {
$API->write('/system/script/run',false);
$API->write("=.id=script5");
$API->disconnect();
}
?>
The error would be this:
Warning: require (routeros_api.class.php) [function.require]: failed to open stream: No such file or directory in D: \ usbwebserver \ root \ api \ routeros_api.php on line 3
Fatal error: require () [function.require]: Failed opening required 'routeros_api.class.php' (include_path = '; C: \ php5 \ pear') in D: \ usbwebserver \ root \ api \ routeros_api.php on line 3.
Please, if someone could help me.