Page 1 of 1

Using CGI with PHP

Posted: Tue Jun 01, 2010 5:55 am
by Sephern
For a project I am currently working on, for various reasons I would like part of the code to be compiled. For this reason, I was planning on developing the code in a separate language, compiling it and using it as a CGI script.

I've never used CGI before, and therefore wonder if it is possible to trigger the CGI script through PHP. In essence, I want to send a string as input, and have the CGI return a different string based on what it has processed.

The host does not support the following functions
shell_exec,exec,system,passthru,popen,proc_open,pass_thru,pcntl_exec,proc_close,proc_get_status,proc_nice,proc_terminate,dl,pclose,pfsockopen,posix_kill,posix_mkfifo


Is what I am looking to do possible, and if so, can you point me in the right direction? Thanks.

Re: Using CGI with PHP

Posted: Tue Jun 01, 2010 6:41 am
by markusn00b
Nothing springs to mind, other than making an HTTP request to the CGI application.

However, if you have a part of your PHP application that is quite intensive, why not write it as a PHP extension (compiled C)?