How to integrate C in PHP
dear friends,
I really really need help on how i can integrate c program in php. I need some example on how to do it. I've try to read the php manual on php.net but i can't understand it.
->My project- developing a web-based system (written in php) for a
consultancy company and implementing ECC algorithm (encryption) (written in C) to the company's critical data.
Please!!!
Thanks a lot in advance.
-shaky-
How to integrate C in PHP
Moderator: General Moderators
hi volka!
*******************************************************
or maybe even writing an extension. The php source code package provides a lot of examples of them.
*******************************************************
how do i write an extension?
where do i find the php source code package?
thanks
*******************************************************
or maybe even writing an extension. The php source code package provides a lot of examples of them.
*******************************************************
how do i write an extension?
where do i find the php source code package?
thanks
all extensions are in the directory ext/
start by analyzing a simple extension like tokenizer
http://www.php.net/manual/en/zend.php will help you understand esp. the macros.
There's also a script ext_skel (or ext_skel_win32.php) that helps you creating your own extension
start by analyzing a simple extension like tokenizer
http://www.php.net/manual/en/zend.php will help you understand esp. the macros.
There's also a script ext_skel (or ext_skel_win32.php) that helps you creating your own extension
- Sevengraff
- Forum Contributor
- Posts: 232
- Joined: Thu Apr 25, 2002 9:34 pm
- Location: California USA
- Contact:
Have you looked at the pear package Inline_C?
Or if you want to run the compiled program in php, then you can probably use [php_man]shell_exec[/php_man]
Or if you want to run the compiled program in php, then you can probably use [php_man]shell_exec[/php_man]
Can anybody explain to me step by step what i have to do to integrate C in PHP 'coz i've try to read the php manual u guys suggested, especially
http://www.php.net/manual/en/zend.php. It is to complicated for me to understand especially now i'm running out of time.
Actually, my project is to develop a consultancy info system, where user have to enter their username and password to use the system (in php environment). So then i want to encrypt the password using an algorithm called ECC in C language. That is why i need to integrate C in PHP.
Do you think that's possible? i mean i want to sent the password which user entered to the C program to be encrypt and then send it back to the php program to compare it with the password in the database.
Please help me! I need to know what setting i have to do?
Can i just use Borland Turbo C++? I've try to run simple extension tokenzier using Turbo C++ as suggested by mr. volka, but there are so many error like "unable to open include file PHP.h"!
What can i do? Is there any setting that i need to do first?
http://www.php.net/manual/en/zend.php. It is to complicated for me to understand especially now i'm running out of time.
Actually, my project is to develop a consultancy info system, where user have to enter their username and password to use the system (in php environment). So then i want to encrypt the password using an algorithm called ECC in C language. That is why i need to integrate C in PHP.
Do you think that's possible? i mean i want to sent the password which user entered to the C program to be encrypt and then send it back to the php program to compare it with the password in the database.
Please help me! I need to know what setting i have to do?
Can i just use Borland Turbo C++? I've try to run simple extension tokenzier using Turbo C++ as suggested by mr. volka, but there are so many error like "unable to open include file PHP.h"!
What can i do? Is there any setting that i need to do first?