fork download
  1. <?php
  2.  
  3. $url = 'https://s...content-available-to-author-only...k.com/api/payment/execute';
  4.  
  5. $postData = array(
  6. 'param1' => 'value1',
  7. 'param2' => 'value2'
  8. );
  9.  
  10. $ch = curl_init();
  11. curl_setopt($ch, CURLOPT_URL, $url);
  12. curl_setopt($ch, CURLOPT_POST, 1);
  13. curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postData));
  14. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  15.  
  16.  
  17. $response = curl_exec($ch);
  18.  
  19. if (curl_errno($ch)) {
  20. echo 'cURL Error: ' . curl_error($ch);
  21. } else {
  22. echo 'Response: ' . $response;
  23. }
  24.  
Success #stdin #stdout 0.03s 26144KB
stdin
Standard input is empty
stdout
cURL Error: Could not resolve host: start.paymentlnk.com