fork download
  1. <?php
  2.  
  3. $apiUrl = 'https://a...content-available-to-author-only...m.ph/api/confirm-payment';
  4.  
  5. $data = array(
  6. "batch_id" => 9,
  7. "event_id" => 1,
  8. "pay_ref_no" => "231203023201IYC6994"
  9. );
  10.  
  11. $options = array(
  12. CURLOPT_URL => $apiUrl,
  13. CURLOPT_RETURNTRANSFER => true,
  14. CURLOPT_FOLLOWLOCATION => true,
  15. CURLOPT_HEADER => false,
  16. CURLOPT_CUSTOMREQUEST => 'POST',
  17. CURLOPT_POSTFIELDS => json_encode($data),
  18. CURLOPT_HTTPHEADER => array(
  19. 'Content-Type: application/json',
  20. 'User-Agent: PHP cURL', // Generic user-agent string
  21. ),
  22. CURLOPT_SSL_VERIFYPEER => false, // Add this line to disable SSL verification (temporary solution)
  23. );
  24.  
  25. $ch = curl_init();
  26. curl_setopt_array($ch, $options);
  27.  
  28. $response = curl_exec($ch);
  29.  
  30. if (curl_errno($ch)) {
  31. echo 'Curl error: ' . curl_error($ch);
  32. }
  33.  
  34.  
  35. // Print the response
  36. echo $response;
  37.  
  38. ?>
Success #stdin #stdout 0.04s 25976KB
stdin
Standard input is empty
stdout
Curl error: Could not resolve host: admin.dtic.com.ph