Click to See Complete Forum and Search --> : Anybody ever write a PHP extension?


silent
07-07-2004, 02:55 AM
I am working on a PHP extension for my FreeLock script encoder,
and was wondering if anybody has any idea how I would call
MCrypt functions through it...

Just curious...

ZibingsCoder
07-07-2004, 12:49 PM
Not that I'm an expert on this, but I'm pretty sure you can use the "call_user_function_ex" function to call up pretty much any function that is available to the user. Like I said, not an expert, nor have I played with it, but I assume it'll perform similar to the PHP function: call_user_func(), which allows you to call any function available by name.

Give it a try, and let me know if it works please.

silent
07-07-2004, 01:27 PM
The docs on zend.com/apidoc are out of date, as they have added a parameter to call_user_function(_ex), so I had to grep
the sources to find out what it was... :)

But I did get it working, but only with an actual user function :

function test() {
echo "This is a test function";
}

my_module_function('test');


And that works fine...
But I can't seem to call any library functions...

I think I may need to integrate directly with the MCrypt library...
:(

That should be fun...

ZibingsCoder
07-07-2004, 01:50 PM
*shrugs* Sorry man, that was the closest thing I could find dealing with it. Hoped it'd work like it does in PHP. What exactly are you making that needs the extension again?

silent
07-07-2004, 03:17 PM
http://freelock.sourceforge.net

It's a PHP script encoder (free)