C++ and PHP

How can I use php to submit a value to a c++ program and then receive the result and display it. Here's an example of the php I am trying to use:

1
2
3
4
5
6
7
8
<?php
INCLUDE 'index.php';
$form1 = $_POST['input1'];
exec("http://addresstoprogram/program $form1",$output);
echo $output;

?>
Topic archived. No new replies allowed.