Re: Calling c function from php
| From: | CPT John W. Holmes | Date: | Wed, 18 Jun 2003 14:56:52 +0000 |
| Subject: | Re: Calling c function from php | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-151989@lists.php.net to get a copy of this message | ||
> Anyway, can any make a suggestion on how to connect to a c function from
> a php app?
>
> I have to connect to a 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.
>
> I've been told there's an api or module on the php site with
> documentation that I am trying to research.
>
> Has anybody ever done this ?
I'm sure you could compile it into PHP somehow, if you wanted to go that
route. I can't help you there, though.
Or, you could just compile your C function into a stand-alone program and
call it through exec(), passing the parameters it needs and then retrieving
the output.
Why not just "port" the C code over to PHP??
---John Holmes...