This is how the application works:
When a user connects to the hotspot, they are redirected to the hotspot plans page where they are asked to choose a hotspot plan and pay for it. After they have paid for that plan, the application automatically creates a user on the user-manager database using the details they provided and activates their profile so that the user can access the internet(I am using the radius server to authenticate users). The application works very well on my local computer using localhost.
My Problem
The problem arises when I host the application on the server(online). When I try connecting to the router from the online application, the connection does not go through. I get an error saying "Error connecting to RouterOS".
How I am doing it
Code: Select all
use PEAR2\Net\RouterOS;
//connectng to the router
$client = new RouterOS\Client('198.162.164.49', 'admin', 'password');
//interacting with the router
The web application is hosted on a VPS running ubuntu os. Could someone suggest to me what I am supposed to do or what I am doing wrongly here?
Thank you.