|  | Posted by Erwin Moller on 06/10/68 11:20 
melih.onvural@gmail.com wrote:
 > Group,
 >
 > I want to get into a remote server, tail a file, and see if the last
 > line is an error or not. I think that I've figured out how to shell
 > over and tail the file. I have the specific server information and
 > filename/location all stored in a database. I can't figure out how to
 > get the result of the tail into a variable so that I can search it for
 > an ERROR string. Any ideas?
 >
 > thanks in advance,
 >
 > melih
 
 Hi,
 
 If you can write the command (including the tail) and execute succesfully in
 a shell, you can also give it to PHP and let PHP execute it.
 Then you catch the result.
 
 http://nl2.php.net/manual/en/ref.exec.php
 
 It contains many usefull links to functions you might want to use.
 
 I think shell_exec is usefull for you, but just scan through them and decide
 for yourself.
 
 shell_exec:
 Execute command via shell and return the complete output as a string
 
 Hope that helps.
 
 Regards,
 Erwin Moller
  Navigation: [Reply to this message] |