Using CGI with PHP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Sephern
Forum Commoner
Posts: 73
Joined: Sun Jan 04, 2009 4:44 pm

Using CGI with PHP

Post 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.
User avatar
markusn00b
Forum Contributor
Posts: 298
Joined: Sat Oct 20, 2007 2:16 pm
Location: York, England

Re: Using CGI with PHP

Post 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)?
Post Reply