telnetty/phpy/unixy thing

From: Date: Tue, 24 Jul 2001 19:36:33 +0000
Subject: telnetty/phpy/unixy thing
Groups: php.general 
Request: Send a blank email to php-general+get-59412@lists.php.net to get a copy of this message
Hey all... I tried sending this earlier... accidentally sent it to php-general@php.net, then tried bouncing it to the write address... anyway, apologies if it didn't work correctly. Anyhoo... I'm trying to get a piece of information from a server in the field that responds to a certain command with a line of data... ie 'telnet machine temp' and it gives back "MACHINE:75.3" (temperature). Anyway, there's a bunch of other stuff you can do to it with rsh, but that's not directly important. I'm trying to build a web interface to control these machines. Basically, I need to have PHP call 'telnet machine temp' and have it feed out whatever the machine returns... I've tried exec(), system(), passthru(), and backticks, all without success. I imagine that the reason for this is that telnet isn't routing it's stuff to STDOUT (or whatever it is that php reads from in this situation). Now, get this. If I use my php binary (shell scripting with php! wh00!) it works dandy... the temp gets passed on, yadda yadda yippy. But the second you try from a web browser, no dice. Now, I may be completely off track here... it may be that for some reason that I don't understand, telnet isn't actually outputting anything... I suspect it is, though. So... any ideas how I can get what I want? Thanks, Ben

« previous php.general (#59412) next »