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 = ‘https://www.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|status,error code|destination|message id|units|status,error code|destination|message id|units|status,…

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

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 *