Sending bulk sms using our robust http api is very easy. Simply copy and paste the code sample below and replace the placeholders with yours

<?php

$email = urlencode(‘your-login-email’);
$password = urlencode(‘your-password’);
$type = ‘0 or 1’;
$dlr = ‘0 or 1’;
$destination = urlencode(‘gsm-1,gsm-2,gsm-3,…’);
$sender = urlencode(‘sender’);
$message = urlencode(‘message’);

$url = ‘http://smsgator.com/bulksms?email=’.$email.’&password=’.$password.’&type=’.$type.’&dlr=’.$dlr.’&destination=’.$destination.’&sender=’.$sender.’&message=’.$message;

$response = file_get_contents($url);

echo $response;

?>

A response  from our API will look like this

error code|destination|message id|units,error code|destination|message id|units,error code|destination|message id|units…

For more information, visit our API page http://smsgator.com/Developer

Let us know how it went.

How to send bulk sms using php and http api
Tagged on:     

2 thoughts on “How to send bulk sms using php and http api

  • February 17, 2016 at 7:39 am
    Permalink

    Could you please provide a sample for the format of the response?

    Reply
    • February 17, 2016 at 6:26 pm
      Permalink

      The post has been updated with a sample.

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *