removing odd characters after socket_read

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I'm having a major issue in which I am reading data from a telnet
server with socket_read, and the data apears to be coming back with
what seems like either line feeds that stay on the same line or
left-arrow characters. I can't really figure out what is coming back,
so I'm not sure how to parse it out. If I simply dispay it on a web
page, it works, but if I try to feed it through an ajax call, it prints
the first line, then stops. I'm sure this is because it line feeds on
the same line or something. Also, I cannot do proper regex matching on
the lines as well.

Is there anything in PHP that can clean up these lines? Or would I have
to build a preg_match statement and only allow letters and punctuation?


Re: removing odd characters after socket_read

Well I may have solved the problem myself. A simple trim seemed to
clear it up as all the strange characters seem to be at the beginning
of the string.


Max wrote:
Quoted text here. Click to load it

Site Timeline