Jump to content

C compiler to php compiler


rajnaveen

Recommended Posts

Hi Guys,

I have an function in php in the format of in-built source code file of that function in c language.So now what i do is that on compile the c file i got an executable file using those executable file in c.I want to run the php function to get the output in php.

For clarification Example:
One of the function in php -> crypt( )
I have an source code of that crypt( ) function which is built in c language.
I do some of the modification in that in-built code which is in c language.
After that now i compile the in-built code and got an executable file in c.
By using this executable file i want to run the crypt() function in php compiler and want the output in php.

Link to comment
Share on other sites

If you want to run some C function code from PHP then you basically have two options:

 

1) Implement a PHP Extension in C so you can expose the function to your scripts or

2) Build an executable that you can run and use functions like exec or proc_open to execute it with your input then capture the output.

 

What kind of changes are you wanting to make to the standard crypt() function and why?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.