0 Replies - 1212 Views - Last Post: 03 December 2012 - 02:55 PM Rate Topic: -----

#1 t2nator  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 28
  • Joined: 14-September 12

C++ and PHP CGI

Posted 03 December 2012 - 02:55 PM

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;

?>



Is This A Good Question/Topic? 0
  • +

Page 1 of 1