Advertisement
Guest User

Inopem

a guest
Jun 19th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.48 KB | None | 0 0
  1. <?php
  2. $json = "
  3.  {
  4.    "phone_number": "628339606493",
  5.    "message": "Hello World",
  6.    "device_id": 94172
  7.  }
  8. ";
  9. $ch = curl_init();
  10.  
  11. curl_setopt($ch, CURLOPT_URL,  "https://smsgateway.me/api/v4/message/send" );
  12. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1 );
  13. curl_setopt($ch, CURLOPT_POST,  1 );
  14. curl_setopt($ch, CURLOPT_POSTFIELDS,  "Content=$json" );
  15. curl_setopt($ch, CURLOPT_HTTPHEADER,  "Authorization=eyJ0eXAiOiJKV1QiLCJhbkaIOiJIUzI1NiJ1" );
  16.  
  17. $result=curl_exec ($ch);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement