fork download
  1. <?php
  2.  
  3. // Initialize cURL session
  4. $curl = curl_init();
  5.  
  6. // Set the URL and headers
  7. CURLOPT_URL => 'https://g...content-available-to-author-only...m.pk/jazzcash/third-party-integration/srv2/api/wso2/ibft/inquiry',
  8. CURLOPT_RETURNTRANSFER => true,
  9. CURLOPT_ENCODING => '',
  10. CURLOPT_MAXREDIRS => 10,
  11. CURLOPT_TIMEOUT => 30,
  12. CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  13. CURLOPT_CUSTOMREQUEST => 'POST',
  14. CURLOPT_POSTFIELDS => json_encode([
  15. "data" => "8e7ad04bffae4f1b7985ee1d116d2a88fffaf4a673425924da6330ac6a403faca943c13d4b01c2fbe1d7e628b7f0c709efceeea5deadbf946f397b08cdcd3b66bbe271f21fb6b2c2be6f7161af2d4bfa4eab75f83ddbc65252fd78e82929300c6e6c89a8ff30c646db0f19bb78027d947a1f32c5c6218b00bce19a531730fe8222579a66df66ed8d732cf3c18c6d521495573fbfa2eb24bf908092c1cda0d7fa"
  16. ]),
  17. CURLOPT_HTTPHEADER => array(
  18. 'Accept: application/json',
  19. 'Authorization: Bearer 006d907f-16c5-39f6-8fe6-092f20e0fd08',
  20. 'Content-Type: application/json'
  21. ),
  22. ));
  23.  
  24. // Execute the request and capture the response
  25. $response = curl_exec($curl);
  26.  
  27. // Check for errors
  28. $err = curl_error($curl);
  29.  
  30. // Close cURL session
  31. curl_close($curl);
  32.  
  33. // Check the result
  34. if ($err) {
  35. echo "cURL Error #: " . $err;
  36. } else {
  37. echo $response;
  38. }
  39.  
Success #stdin #stdout 0.03s 26420KB
stdin
Standard input is empty
stdout
cURL Error #: Could not resolve host: gateway-sandbox.jazzcash.com.pk