Resource URL

http://sms.webadd.in/api2/send/?

Sample code: PHP
Method: POST

  1. <?php
  2. // WebAdd account details
  3. $username = 'youremail@address.com';
  4. $hash = 'Your API hash';
  5. // Message details
  6. $numbers = array(917735838811, 917735838811);
  7. $sender = urlencode('WEBADD');
  8. $message = rawurlencode('This is your message');
  9. $numbers = implode(',', $numbers);
  10. // Prepare data for POST request
  11. $data = array('username' => $username, 'hash' => $hash, 'numbers' => $numbers, "sender" => $sender, "message" => $message);
  12. // Send the POST request with cURL
  13. $ch = curl_init('http://sms.webadd.in/api2/send/');
  14. curl_setopt($ch, CURLOPT_POST, true);
  15. curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
  16. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  17. $response = curl_exec($ch);
  18. curl_close($ch);
  19. // Process your response here
  20. echo $response;
  21. ?>