4
I am trying to capture data from an OLT CIANET via Telnet or SSH and I have not been successful, I want to know in which slot/UN is connected, the command to display the Onus I use is:
show port epon ".$slot."/1-4 onu mac ".$mac." epon-mac-address-table
I tried using an SSH class and another Telnet, I did not succeed in any of them, if someone has a telnet or ssh class, or example of how to send and capture those of the OLT, I thank you.
Already tried using the function exec()? the second argument is output text from the prompt.
– rray
I managed to solve using ssh2, but I confess that it was not legal, very difficult to capture the return data of the equipment...
– Fabio Branco da Silva
Could you demonstrate how you did it? Other people might have the same problem.
– rray
yes, I’ll put the script:
– Fabio Branco da Silva
Have you thought about using the exec() shell? I think it would be easier.
– Rodrigo F. Minelli
Unfortunately a simple shell exec would not meet the need, because it is an external machine, that is, it must be accessed and sent the commands to it remotely.
– Fabio Branco da Silva