start_request.php 822 B

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