Re: PHP-DB - calling c function from php app
| From: | Hugh Bothwell | Date: | Tue, 17 Jun 2003 20:58:40 +0000 |
| Subject: | Re: PHP-DB - calling c function from php app | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-28686@lists.php.net to get a copy of this message | ||
"Mignon Hunter" <hunter@tic.toshiba.com> wrote in message
news:1055882215.1589.68.camel@joboo.tic.toshiba.com...
> Can anyone make a suggestion on how to connect to a c function from a
> php app?
>
> I have to connect to sales tax calculation software. The function
> is being written for me but I have to figure how to call it - get the
> variable - and use it again in my php app.
>
> Is this even possible ??
How complex is this function? And how often might it change?
If it is reasonably simple, it might be worth coding
directly in php. Slightly longer, and you could compile
the C program and exec() it; or, more efficiently, you
could look at the source to the php extensions and
figure out how to turn it into an extension.
If it's really a monster, or is part of a commercial
package, it might be worth exposing it as a web
service; then your script can call it using a
well-documented interface.
--
Hugh Bothwell hugh_bothwell@hotmail.com Kingston ON Canada
v3.1 GCS/E/AT d- s+: a- C+++ L++>+++$ P+ E- W+++$ N++ K? w++ M PS+
PE++ Y+ PGP+ t-- 5++ !X R+ tv b++++ DI+++ D-(++) G+ e(++) h-- r- y+