Do you have a question? Post it now! No Registration Necessary. Now with pictures!
February 2, 2006, 9:15 pm
rate this thread
proprietary algorithm that is compiled into a C shared object.
I have been looking for the best way to do this and noticed that I can
write a Zend engine extension to allow me to do this but I was wondering
if there was a more simple way.
Is a PHP library that allows me to load and the .so file without having
to write my own wrapper (sort of like a dlopen() or LoadLibrary() for
PHP)? I have looked at the PHP manual on PHP.net but couldn't see anything.
Are there any other alternatives or is the Zend extension the best/only way.
I am more familiar with C & C++ than PHP so forgive me if this is a
Thanks very much in advance
Re: calling a native library
I'm not aware of anything like you suggest. Wite your own main(argc, argv)
function to call it then use one of the program execution fns in PHP? I
guess by the time you created a daemon wrapper around the library and wrote
the PHP end, you'd probably be as quick building it into a PHP extension.