
June 25th, 2011, 02:37 AM
|
Registered User
|
|
Join Date: Jun 2011
Posts: 1
Time spent in forums: 7 m 57 sec
Reputation Power: 0
|
|
General - PHP Telnet Scripting
So I want to create a web page that connects to a telnet server running a MUD. read the output from the connection one line at a time and parse and handle the output with a PHP script to run a very intensive and specific bot for the game.
I want to be able to analyze each line from the telnet connection and store information directly to a MySQL db, allowing the script to interpret and store information to be used as a web accessible game reference while also sending commands back over the telnet connection in response to analyzed output.
Specifically I need to understand how to create and sustain the connection. how to check if the connection has been closed by the host or disconnected so the connection can automatically reestablish itself and if there is a php library that can interpret the ANSI color codes etc so the strings received from output can be checked with AND without color specific traits. then finally, how to close the connection when the process has finished.
Is anyone able to break this down for me so I can better understand the process or how the code would need to be written?
|