Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

nabilkrs's avatar

is it possible to control the router using php?

Hey folks. I was wondering if I can manage the Internet router using php. In fact, I want to add or remove a mac address to whitelist. If there is a plugin or native php code please tell me.

0 likes
7 replies
Sinnbeck's avatar

@nabilkrs maybe if you said which router it would help. But the problem is the router, not php. Php can communicate with just about anything

Tray2's avatar

If the router has an api that you can access sure.

1 like
Tray2's avatar
Tray2
Best Answer
Level 73

@nabilkrs Then no, php is a server side language, which requires a webserver or at least a php interpriter. So if you can run php on the router then maybe you can control it, but I doubt it would allow you to do that.

Yes, I know you meant a internet router, and it can have an rest api, but I doubt it. If it have any way of interacting with it, its most likely undocumented and might ever be against the user license agreement.

However take a look at this, it might give you some ideas

https://github.com/jackyaz/scMerlin

1 like

Please or to participate in this conversation.