Is there any decent examples of telnet PHP scripts out there or anyone have any good code examples? Especialy one that sends commands per line. I would like to use one for accessing a MUD from my web page.

If it is your code please explain how to set it up for a newbie. 🙂

Thanks for any info!

    why not have generate a telnet script that'll do what you want and exec it through php?

      I am new to PHP but I do have some pascal programing experience.

      I could write a basic text telnet client in pascal. But how would this be done to inferface a program's input/output with PHP? Does PHP port the standard text output or does the output need some special format/pipe?

      I currently use OS/2 (basicly a UNIX port of PHP) and PHP for Windows.

        depends on what you need to do... explain and someone will know 🙂

          Ok I will try and be more specific.

          I would like to access a MUD/telnet via my PHP enabled web server at home (getting access through a bew browser on a password protected firewall).

          What would be the best way to do this? Is there a PHP code example to do this?

            Hmm ... could be a bit tricky ... how would the web browser know that the telnet server had sent anything to the web server?

              The PHP script running on the server would have to become the in-between for the contacted telnet server and web visitor.

                That's just it: the web server will only send stuff to the browser in response to a request from the browser. So how's the browser to know when to make a request?

                You could use regular (and irritatingly frequent) browser refreshes (ick!), but in the long run I think a better solution would be to see if there's some telnet-in-Java applet (funnily enough, a Google search on "telnet in Java applet" works quite well) that could be used instead. That's assuming that using a telnet client instead of a web browser is out of the question 🙂

                  I tried and have working a java telnet applet. Only problem is it will not get through the firewall. The firewall is ONLY letting explorer through. :/ So it brings me back to square one to find a working example in PHP.

                    Write a Reply...