Well, if security isn't much of a concern (and it looks like it isn't if a webpage is gonna be performing telnet commands...) I would suggest a daemon process running the telnet session and listening on some predefined socket, preferably unix domain. Then, whenever it gets some data on that socket it can do it's thing in the telnet session, preferably with a little data laundering.
Might also be a good idea for the daemon to time out after some long time, and have the client cgi check to see if it's listening on the socket, and if not start the daemon again. That way, there won't always be a telnet session open.
'The fickle fascination of and Everlasting God'
- Billy Corgan, The Smashing Pumpkins
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|