Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

C++ and PHP CGI

$
0
0
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:

<?php
INCLUDE 'index.php'; 
$form1 = $_POST['input1']; //get data from html form and store in php variable
exec("http://addresstoprogram/program $form1",$output); //attempt to use exec to execute external program and receive the result
echo $output;

?>


Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>