[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ITL php code



--- Omar Abo-Namous <merlin12345 at gmx dot de> wrote:
> On Thu, 3 Jun 2004 03:35:01 -0400, Behdad Esfahbod wrote:
> > It IS possible to wrap the shared library in a PHP module, so you
> > can call your functions in PHP.  By PHP code I meant the source
> > code of PHP (http://www.php.net/).
> 
> yeah but that means contacting them to include it as a library into php
> or perhaps just including it in the php-config file. But since most of
> web-programmers don't have direct access to the server they are running at,
> i think it's not a simple solution. I am searching for a runtime function
> that loads an external c-library.

Omar, the idea is to download and install the ITL library along with
PHP code (which you'll write) that accesses that ITL C-library (you
can replace ITL with fribidi or any other library).  The question now
is not if accessing C code from you application is doable, its a
question of how its done.  Some programs have native support to do
that (ie. its embedded within the programming language itself - a
feature if you will) others depend on external "bridging" (if you
can even call it that).  An example of an external connecting
application (again I'm not sure if PHP (or Java) can't do this
natively) is SWIG, 

  http://www.swig.org

If need be, we can add these "interface (*.i)" files to the ITL
library so as to ease people's life (so they don't have to port
anything and simply call the functions - again this is a library
after all :-)  So instead of you having ported all the library's
code to PHP you would have simply written PHP code to access the
public C functions (akin to 'ipraytime' or 'idate') and that
simplifies life for everyone involved - you'll simply have to worry
about the interface/function calls (or API) changing and not give
a hoot about the internals of the library.

Hope that makes more sense.

PS: Gents, do please trim your replies to include only relevant text.

Salam.

 - Nadim


	
		
__________________________________
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/