Console in browser
here is the scenario a user will paste his c code in browser, that code will be sent to my server. Server will compile the program and execute it.
on encountering printf it will print text on browser as output.
on encountering scanf it will wait till user type input in browser that will be sent to server.
then server will execute program and display result.

i just don't have any idea how to do it? what technologies use? may be a console like text area from where user can give input?
Console in browser
===

here is the scenario a user will paste his c code in browser, that code will be sent to my server. Server will compile the program and execute it.
on encountering printf it will print text on browser as output.
on encountering scanf it will wait till user type input in browser that will be sent to server.
then server will execute program and display result.

i just don't have any idea how to do it? what technologies use? may be a console like text area from where user can give input?