note 79160 deleted from function.fsockopen by danbrown
| From: | danbrown@php.net | Date: | Mon, 18 May 2009 01:47:48 +0000 |
| Subject: | note 79160 deleted from function.fsockopen by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-155598@lists.php.net to get a copy of this message | ||
Note Submitter: dali at dali dot net dot nz
----
After several days of trying to get telnet going from php 5.2, i've come up with http://www.dali.net.nz/Telnet.class.php.txt
based on the one found at http://cvs.adfinis.ch/cvs.php/phpStreamcast/telnet.class.php
example usage:
<?php
$telnet = new Telnet('telnethost.example.com');
$telnet->login('username', 'password');
echo $telnet->exec('ifconfig') . "\n";
echo $telnet->exec('ls -lh') . "\n";
$telnet->disconnect();
?>