I'm running php4 as a CGI binary. During the course of a cronjob scheduled script, I need to execute an external program which connects to another server using an implementation of eftp (sort of ftp for ISDN). The eftp program returns no success/error codes, is moderately unstable, and the remote server/network is often unavailable - thus blind automation is out of the question. On a good day, however, it all works and data/info is sent to STDOUT. My problem is this: how to make my script interact with the eftp program? I need to start it, check for a successful connection, move files around locally, upload/download files, send emails, log data, etc, etc, depending on which commands were successful and which were not. The only thing I'm getting back is the STDOUT stream? How can I capture this in real time (as opposed to in a big lump once the program has finished), pause the eftp program, parse the output then send suitable commands back to the eftp program? I've checked out most of the likely functions (popen() was looking good for a while, exec() and system() seem to offer little scope for interactivity) but there always seems to be a 'gotcha' at some point. If anyone has some insight into this problem, their help, or a pointer in the right direction, would be appreciated. All the best, -- Paul Replace "spamtrap" with "paul" to reply by e-mail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]