I'm not sure that this goes to right place but I try nevertheless.
What I would like to know is that, is it possible to control Layer 2 Switch ports using PHP through SNMPv2? The idea is to turn ports on/off through web application. Like I said, I am not even sure that this is possible but any idea would be welcomed.
Possibility to manage Layer 2 Switch ports with PHP
Moderator: General Moderators
-
Pethlehemm
- Forum Newbie
- Posts: 2
- Joined: Mon Nov 03, 2008 3:03 pm
Re: Possibility to manage Layer 2 Switch ports with PHP
Think about this way: if you can do it in terminal mode on the server where PHP is installed, then yes.
Are there build-in PHP functions to manage a router? no.
Concrete Answer: Do it on the terminal, then use backticks (`) or shell_exec to issue the connection/commands.
Are there build-in PHP functions to manage a router? no.
Concrete Answer: Do it on the terminal, then use backticks (`) or shell_exec to issue the connection/commands.
-
Pethlehemm
- Forum Newbie
- Posts: 2
- Joined: Mon Nov 03, 2008 3:03 pm
Re: Possibility to manage Layer 2 Switch ports with PHP
OK. But this isn't actually a web application, is it? Like I understand, there is no way to create layer2 switch controller using only PHP and which works through web? Can anyone say what are other possibilities?
Re: Possibility to manage Layer 2 Switch ports with PHP
I'm not sure what else you want. If you can issue a command via terminal, you can issue it with PHP. And that means you can either make this a command line php utility or turn it into a web-based application.