Can someone tell me if it is possible to make calls to a C++ API from within PHP? If so, how?
I am developing a GUI in PHP and need to make calls to an API written in C++ in order to
retreive data to be displayed in the GUI.
Any help would be greatly appreciated.
Thanks in advance,
magicstarmike
PHP and C++ API
Moderator: General Moderators
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
Read the user comments on this page of the PHP manual. I am not a C programmer, but there are many who frequent this community so I am sure someone can answer this question better than me.
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
If the API can be called via: command line or COM or local port, php doesn't need external help, but if the API does not support any of those, you'll need to build an interface to perform one or more of these actions. This interface may be best done by creating an extension that php can load, along with the API to make the calls for you. PHP may have an interface already for this API, which are you working with?