Summary


In this short chapter, you were introduced to various methods of communicating with your system and its external applications. Although PHP is a very fast and robust language, you may find it more cost- and time-effective to simply utilize pre-existing scripts in other languages such as C or Perl. You can access these external applications using popen(), exec(), system(), and passthru() functions.

You learned how to pipe data to a command using popen(), which is useful for applications that accept data from standard input, and when you want to parse data as it is sent to you by an application. You also learned to use exec() and system() to pass commands to the shell and acquire user input. You also learned to use the passthru() function to accept binary data that is the result of a shell command.



Sams Teach Yourself PHP MySQL and Apache All in One
Sams Teach Yourself PHP, MySQL and Apache All in One (4th Edition)
ISBN: 067232976X
EAN: 2147483647
Year: 2003
Pages: 333
Authors: Julie Meloni

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net