telnet w/ php?

From: Jed Hunsaker (spam_at_lavadrop.com)
Date: 07/29/04


Date: Wed, 28 Jul 2004 20:26:23 -0700

If I run "telnet" from Windows XP like this...

     telnet [host]

I get a command prompt...

     C:\Documents and Settings\jed>

>From which I can type, say... "dir"...

     C:\Documents and Settings\jed>dir

My question is this: How in the world do you make PHP do all of the above?
And how do you have PHP translate the results of "dir" from binary into a
readable string?

I've spent way too many hours of frustration trying to figure this out.

Please help!

Jed

P.S. My ultimate goal is to telnet into various local machines, rename
files, run a couple of .exe files w/ parameters, and get the results
displayed back to me in human-readable text. Each time I run the .exe
files, it could take hours of processing before it's done.



Relevant Pages

  • TSL-2005-0028 - multi
    ... kerberos5, mailman, mod_perl, openssl, php, spamassassin, tcpdump, telnet, wget ... Package description: ...
    (Bugtraq)
  • Establish a connection telnet in PHP on a UNIX server
    ... I wish to establish a connection in language PHP on a UNIX server by telnet. ... Is somebody already wrote a functional program in PHP with the CURL library ...
    (alt.php)
  • Establish a connection telnet in PHP on a UNIX server
    ... I wish to establish a connection in language PHP on a UNIX server by telnet. ... Is somebody already wrote a functional program in PHP with the CURL library ...
    (comp.lang.php)
  • Re: idiot question about chown
    ... >> Why do the file in htdocs need to be owned by the user that PHP ... In this case a better plan might be to change the group ownership ... I didn't think anyone used regular telnet anymore, ...
    (alt.linux)
  • Re: readfile() in download.php
    ... Why not deliver it as a static file, rather than going through PHP? ... Most sites don't allow hosting .EXE files, so I upload the .EXE files as ..BIN files and use PHP to change their "extension" to .EXE when downloaded. ... I'd like to prevent others from linking to individual files for download because their name changes so often; that's why I hid their exact location, which can be accomplished by utilising a download script. ...
    (comp.os.msdos.4dos)