first of all, I'm a French student, so excuse me for my poor English level.
We are currently developing a web server (C++) and I must develop the CGI execution part, more exactly : The PHP CGI part.
When a user ask a .php page on our server, we fork/pipe and call the /usr/bin/php interpreter. For example :
$ /usr/bin/php index.php
Now, we can save the result in a buffer (generated html code of index.php), and I can send this content to the client. It's working for a simple script without any variable.
However, lot of php script use some superglobals like $_GET and $_POST. My problem is : How can I give to the php interpreter this argument ?
Example : How can I set this $_POST variable in the aim to save "Hello world" in our buffer ?
<?php
echo $_POST['text'];
?>
Thank you for your future responses.
cordially