Newbie Question: Can PHP communicate with a C function/program

This is a discussion on Newbie Question: Can PHP communicate with a C function/program within the PHP Language forums, part of the PHP Programming Forums category; I have several library functions that have been created in 'C' which I would prefer not to have to re-...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 11-14-2003
DSandmann
 
Posts: n/a
Default Newbie Question: Can PHP communicate with a C function/program

I have several library functions that have been created in 'C' which I
would prefer not to have to re-write all of them to PHP.

Is there a way to get PHP to run these library functions?

Any help would be appreciated.

Thanks,
David

Reply With Quote
  #2 (permalink)  
Old 11-14-2003
gorf
 
Posts: n/a
Default Re: Newbie Question: Can PHP communicate with a C function/program

"DSandmann" <CrackerDog22@yahoo.com> wrote in message
news:vra4algn5m2f12@corp.supernews.com...
> I have several library functions that have been created in 'C' which I
> would prefer not to have to re-write all of them to PHP.
>
> Is there a way to get PHP to run these library functions?
>
> Any help would be appreciated.


Yes, extensions. I hate to be vague, but I don't know enough to tell you
about them (just learning myself).

--
Mike


Reply With Quote
  #3 (permalink)  
Old 11-15-2003
Nikolai Chuvakhin
 
Posts: n/a
Default Re: Newbie Question: Can PHP communicate with a C function/program

DSandmann <CrackerDog22@yahoo.com> wrote in message
news:<vra4algn5m2f12@corp.supernews.com>...
>
> I have several library functions that have been created in 'C' which I
> would prefer not to have to re-write all of them to PHP.
>
> Is there a way to get PHP to run these library functions?


Yes, and more than one. You can either use the dl() function:

http://www.php.net/dl

or write your own PHP extension (see files README.SELF-CONTAINED-EXTENSIONS
and README.EXT_SKEL in your source distribution).

Cheers,
NC
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 06:48 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0