I managed to read all the functions of the mikrotik with PHP and curl scripts. now I would like to understand how to write or launch scripts with curl. could anyone give me a hand? There are no examples related to the script in the wiki
Wiki
gives you all the information you need on MikroTik's REST API (it's just terminal commands-turn-JSON). You should, provided you have some knowledge of PHP, be able to turn that into a WordPress plugin/bodge.
I would advise against it, since, if you create a single vulnerability while writing this plugin/bodge, which you inevitably will (you're asking for help writing basic PHP things, and PHP is not beginner-friendly in terms of writing secure code), you're giving a potential attacker control of or knowledge about your network.
Also, note that your site being able to access your visitors' routers would necessitate them opening up REST API access on their routers to the Internet, which I think no sane person would ever do.