Re: telnetting

From: Date: Mon, 25 Nov 2002 16:16:22 +0000
Subject: Re: telnetting
Groups: php.windows 
Request: Send a blank email to php-windows+get-17116@lists.php.net to get a copy of this message
Now that's an interesting question! You could use the PHP Sockets extension to send the raw data back and forth to the telnet server, according to the telnet protocol (ish)... You could try to use somebody else's implementation of the above, of which I found a few with google: http://www.levels4you.com/cdc/d3/telnetwrapper/ http://cvs.berlios.de/cgi-bin/viewcvs.cgi/mserv-control/php-telnet/ Or, you could try opening up your system's telnet program with 'proc_open', which gives you control over standard input and standard output. This is more powerful than 'exec' or 'system', because you can interact with your process: http://www.php.net/manual/en/function.proc-open.php As you can see... its a bit harder to manage than 'exec' or 'system', but that's the price you pay for power ;) -- Brian 'Bex' Huff bex@stellent.com Phone: 952-903-2023 Fax: 952-829-5424 > is there a way to connect to telnet via PHP > e.g. login then excute command then logout > O > Ensign Baker > HCO Officer > USS Atlantis

« previous php.windows (#17116) next »