Jump to content

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
https://forums.phpfreaks.com/topic/303755-c-compiler-to-php-compiler/
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?

  • Like 1
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.