Community discussions

MikroTik App
 
cdman
newbie
Topic Author
Posts: 29
Joined: Sun Jan 01, 2006 11:47 pm
Location: Bulgaria/Sofia

REST API PHP Class with examples

Mon Mar 27, 2023 3:06 am

Hi guys, as I am using mikrotik API from a long time, I wanted to check new REST API over HTTPS. So far it works great for me, and I am changing all my systems from regular API to REST API.

Since I did not found any ready to use PHP class solution, I checked HELP page here:
https://help.mikrotik.com/docs/display/ROS/REST+API

And created small PHP Class with several function to read, add, update, delete data. You can find it on github, with example script for usage

https://github.com/cdmanbg/php_routeros_rest_api
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11967
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: REST API PHP Class with examples

Mon Mar 27, 2023 11:26 am

Thanks for the kindness

It is the sharing of knowledge that improves this world.
 
suvasishpaul
just joined
Posts: 5
Joined: Tue Jun 30, 2020 7:14 am

Re: REST API PHP Class with examples

Wed Apr 12, 2023 2:21 pm

Your script is very dangerous from security purpose

because you disable SSL peer verification. Doing so might expose your requests to MITM attackers.
CURLOPT_SSL_VERIFYPEER => false,

Who is online

Users browsing this forum: No registered users and 9 guests