Call external library from PHP. What is faster: exec or extension?
Posted
by robusta
on Stack Overflow
See other posts from Stack Overflow
or by robusta
Published on 2010-06-13T12:09:21Z
Indexed on
2010/06/13
12:12 UTC
Read the original article
Hit count: 163
php
|web-applications
Hi,
I need to make calls from webpage to external library written in C++ and display the result. Platform is Linux, Apache, PHP.
My current idea is to use PHP service which will call my library/program. I found that there are two possible ways to do this: 1) use PHP 'exec' function 2) write PHP extension
I am curious what works more effective? Faster? Less load the server?
I will probably need to do 4 calls per second, so I want to be as optimal as possible.
P.S. If you are aware of some other (more effective) way of calling C++ library or program from webpage, please let me know.
Thanks a lot,
Robusta
© Stack Overflow or respective owner