You are here: Re: calling a native library « PHP Programming Language « IT news, forums, messages
Re: calling a native library

Posted by Colin McKinnon on 02/06/06 00:00

user@domain.invalid wrote:

> I am developing a PHP site to run on a Linux server. I need to access a
> 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'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.

C.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация