Re: PHP connection to external application
| From: | Per Jessen | Date: | Thu, 12 Jun 2008 12:11:48 +0000 |
| Subject: | Re: PHP connection to external application | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-275267@lists.php.net to get a copy of this message | ||
hce wrote:
> What is the best way for a PHP web application to connect to an
> external application written by C in Linux OS?
>
> (1) Can PHP directly call external C functions, or similar solution?
PHP can call external executables via e.g. exec().
> (2) Can PHP pass messages to message queue which external C program
> can access?
PHP can write to a FIFO / pipe.
> (3) Socket connection between the PHP and externam C program.
Yes, that works too.
What is "the best" depends on your requirements.
/Per Jessen, Zürich