fork download
  1. <?php
  2.  
  3. // API URL
  4. $url = 'https://p...content-available-to-author-only...y.net/resend_otp/';
  5.  
  6. // Data to be sent in the API request
  7. $data = json_encode([
  8. 'rmn' => '12345'
  9. ]);
  10.  
  11. // cURL initialization
  12. $ch = curl_init($url);
  13.  
  14. // Set cURL options
  15. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  16. curl_setopt($ch, CURLOPT_POST, true);
  17. curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
  18. curl_setopt($ch, CURLOPT_HTTPHEADER, [
  19. 'Accept: application/json, text/plain, */*',
  20. 'Accept-Language: en-US,en;q=0.9,hi;q=0.8,mr;q=0.7',
  21. 'Cache-Control: no-cache',
  22. 'Content-Type: application/json',
  23. 'DNT: 1',
  24. 'Origin: https://s...content-available-to-author-only...y.com',
  25. 'Pragma: no-cache',
  26. 'Priority: u=1, i',
  27. 'Referer: https://s...content-available-to-author-only...y.com/',
  28. 'Sec-CH-UA: "Google Chrome";v="619", "PQR";v="619", "XYZ";v="619"',
  29. 'Sec-CH-UA-Mobile: ?0',
  30. 'Sec-CH-UA-Platform: "Ubuntu"',
  31. 'Sec-Fetch-Dest: empty',
  32. 'Sec-Fetch-Mode: cors',
  33. 'Sec-Fetch-Site: cross-site',
  34. 'User-Agent: Safari/537.36'
  35. ]);
  36.  
  37. // Execute the request
  38. $response = curl_exec($ch);
  39.  
  40. // Check for errors
  41. if (curl_errno($ch)) {
  42. echo 'cURL error: ' . curl_error($ch);
  43. } else {
  44. // Print the response
  45. echo 'Response: ' . $response;
  46. }
  47.  
  48. // Close the cURL session
  49.  
  50. ?>
Success #stdin #stdout 0.03s 26028KB
stdin
Standard input is empty
stdout
cURL error: Could not resolve host: prodservices.hathway.net