Php – telnet connection using PHP

phptelnet

I need to write a PHP script to telnet to a router, run a command and fetch the results. does anyone know a telnet connection library in PHP?

Update: This request (as is obvious) was for a long time ago. In the end I had to write the client library that I needed myself. The code for this library (and many more modules) is open source and available on github.
Thanks everyone for your answers.

Best Solution

There is a lovely class available for PHP telnet connectivity on Nicholas Hall's Github: https://github.com/ngharo/Random-PHP-Classes/blob/master/Telnet.class.php