start_instance.php 950 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. include 'config.php';
  3. ini_set('display_errors', 1);
  4. error_reporting(E_ALL);
  5. $orderID = $_GET['orderID'];
  6. $machineID = $_GET['machineID'];
  7. $articleID = $_GET['articleID'];
  8. $workerID = $_GET['workerID'];
  9. $ch = curl_init();
  10. curl_setopt($ch, CURLOPT_URL, 'http://localhost:9296/url');
  11. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  12. curl_setopt($ch, CURLOPT_POST, 1);
  13. curl_setopt($ch, CURLOPT_POSTFIELDS, 'info=MainProcess&behavior=fork_running&url=http://192.168.20.133:8080/PHP/processes/mainProcess.xml&init={"orderID":"'.$orderID.'","machineID":"'.$machineID.'","articleID":"'.$articleID.'","rolle":"MAB","workerID":"'.$workerID.'"}');
  14. $headers = array();
  15. $headers[] = 'Content-Type: application/x-www-form-urlencoded';
  16. curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
  17. $result = curl_exec($ch);
  18. if (curl_errno($ch)) {
  19. echo 'Error:' . curl_error($ch);
  20. }
  21. curl_close($ch);
  22. header("Location: ".$formLocation."DTC.html?workerID=".$workerID);
  23. ?>