Unable to post simulation in C on webpage

I have the following simulation in C for cars in the driving circle alt text http://dl.getdropbox.com/u/175564/cars.png

For example,

7 <space> <enter>

gives more machines for modeling, and

s1 <enter>

places the upper sign on the inbound road No. 1.

I want to put the simulation on a web page so that users can try it. However, I do not know where to start.

I know Joomla and a little about Django. Perhaps they can be useful.

How can you put a program on a web page so that users can use it?

+3
source share
7 answers

CGI - , ; , -, . , , PHP HTML . .

: http://www.cs.tut.fi/~jkorpela/perl/cgi.html

, . , .

+4
+2

, C , ? , PHP shell_exec() . -, .

:


    $sim = shell_exec("/path/to/binary -a 5 -b 6");
    echo $sim;

, shell_exec, , .

+2

, , .

cgi http GET/POST ( , ..). , , , .

+2

- Java. tcp- - .

+1

. C -, .

, php , . php.

, , shell_exec() .

, shell_exec ( "/bin/program -arguments > /tmp/prog-tmp.txt" ), prog-tmp.txt.

+1
source

Source: https://habr.com/ru/post/1707085/


All Articles