Hello, I’m starting now in the mikrotik world and I see that it’s very powerful. I have the following scenario I have a hotspot configured all right, and I would like to integrate a page for the user to register (Already created). So far no problems, I threw the files in my RB951ui-2nd (PHP MikroTik API too) and at the time of executing the PHP part I realized I had no PHP interpreter in RB, obviously rsrs. My question is if you need a machine with the MikroTik PHP API together with a PHP interpreter and not the RB with the API like I had done since it did not have the interpreter. Then it would look like this ???: the user requests the registration in RB by clicking the button and then RB redirects to the registration page that is in the machine, from there it processes and sends to RB using the API, if I’m wrong, please correct me. Thank you very much for the attention and I hope the collaboration of who can help me.
<?php require('../routeros_api.class.php'); $API = new routeros_api(); $API->debug = true; $name=$_POST['name']; $senha=$_POST['password']; \ \ $ip = 'Ip'; $usuario = 'User'; $senharb = 'password'; \ \ if ($API->connect($ip, $usuario, $senharb)){ $API->comm("/ip/hotspot/user/add", array( "name" => $name, "password" => $password, "server" => "server", "profile" => "default", )); $API->disconnect(); } ?>