fork download
  1. <?php
  2.  
  3. $curl = curl_init();
  4.  
  5. CURLOPT_URL => 'https://r...content-available-to-author-only...d.com/v3/sms/send',
  6. CURLOPT_RETURNTRANSFER => true,
  7. CURLOPT_ENCODING => '',
  8. CURLOPT_MAXREDIRS => 10,
  9. CURLOPT_TIMEOUT => 0,
  10. CURLOPT_FOLLOWLOCATION => true,
  11. CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  12. CURLOPT_CUSTOMREQUEST => 'POST',
  13. CURLOPT_POSTFIELDS =>'{
  14. "messages" : [
  15. {
  16. "source" : "php",
  17. "body" : "Hello there",
  18. "to" : "{+61411111111}",
  19. "custom_string" : "this is a test"
  20. },
  21. {
  22. "source" : "php",
  23. "body" : "Hello there",
  24. "to" : "+61422222222",
  25. "custom_string" : "this is a test"
  26. },
  27. {
  28. "source" : "php",
  29. "body" : "Hello there",
  30. "to" : "+61433333333",
  31. "custom_string" : "this is a test"
  32. },
  33. {
  34. "source" : "php",
  35. "body" : "Hello there",
  36. "to" : "+61444444444",
  37. "custom_string" : "this is a test"
  38. },
  39. {
  40. "source" : "php",
  41. "body" : "Hello there",
  42. "to" : "14055555555",
  43. "custom_string" : "this is a test"
  44. },
  45. {
  46. "source" : "php",
  47. "body" : "Hello there",
  48. "to" : "+14055555666",
  49. "custom_string" : "this is a test"
  50. },
  51. {
  52. "source" : "php",
  53. "body" : "Hello there",
  54. "to" : "+447777777777",
  55. "custom_string" : "this is a test"
  56. },
  57. {
  58. "source" : "php",
  59. "body" : "Hello there",
  60. "to" : "+8615555555555",
  61. "custom_string" : "this is a test"
  62. }
  63. ]
  64. }',
  65. CURLOPT_HTTPHEADER => array(
  66. 'Content-Type: application/json',
  67. 'Authorization: Basic ZWxpYXMubXVuc2h5YUB6bWIuYXBobC5vcmc6QTk3QTI5NUEtRDkzQi01Mjg0LTA5QTktRjM3NTU3OURDNTJF'
  68. ),
  69. ));
  70.  
  71. $response = curl_exec($curl);
  72.  
  73. curl_close($curl);
  74. echo $response;
  75.  
Success #stdin #stdout 0.03s 26120KB
stdin
Standard input is empty
stdout
Standard output is empty