Compiling a C program that was entered into a textbox and received via PHP?

Posted by PROFESSOR on Stack Overflow See other posts from Stack Overflow or by PROFESSOR
Published on 2009-12-18T19:09:24Z Indexed on 2010/05/09 4:38 UTC
Read the original article Hit count: 297

Filed under:

I have this problem: I want to pass a whole C code from a php textbox onto server and want to compile it with gcc and want the output back on php page. Is it possible?

Sample code:

php page input
<textarea>
#include<stdio.h>
void main()
{
printf("hello world");
}

Compiled on server terminal/shell

php page output:

hello world

© Stack Overflow or respective owner

Related posts about php5