Modernize your business reaches by PHP SMS Gateway Integration

Posted by divyanshi on March 24th, 2020

With the development of SMS advertising through PHP SMS Gateway Integration, business showcasing has become the most effortless practice in the business. Utilizing points of arrival and mass SMS benefits, the undertaking can arrive at a huge number of target crowds in no time. 

A PHP is a site page planned with the sole goal to make its guests aware of the business with the introduction and features of the business. This perspective can be identified with the items/administrations offered by the ventures, regular discounts, and so forth. Regularly, PHP is otherwise called as call-to-action (or CTA) pages as these pages can be legitimately gotten to by the end-client by a straightforward snap on the assigned connection in the online interface, business SMS, or email. Despite the wellspring of communication, potential clients and customers can be straightforwardly explored to CTA pages without any issue. 

Tell more with SMS advertising through PHP 

Commonly, a 160 character SMS sent utilizing interfaces like Bulk SMS API isn't sufficient to change over potential customers into the business. For example, rare it is conceivable to detail all items and administrations in a solitary SMS. You may wish to tell the clients all the more yet are bound by the character furthest reaches of SMS. 

In such circumstances, PHPs can be the best salvage. To best comprehend SMS advertising through a point of arrival, let us view stepwise production of greeting page and its use in mass SMS 

Making your computerized content 

The absolute initial phase right now to create your computerized content. This can be effectively finished with the assistance of easy to understand home page makers offered by Basically, a PHP maker is a web interface that permits you to create your advanced substance utilizing pre-characterized, responsive formats 

Making on the web-connect 

When you have drafted the content for PHP, the subsequent stage is to make a web interface for this page that can be imparted to the potential leads and clients by means of SMS. You can basically acquire this weblink by sparing this page on CTA maker. 

Sending bulk SMS 

The last advance during the time spent SMS advertising through a personal home page to send this connect to the intended interest group utilizing bulk SMS services. The connection can be legitimately advantageously sent inside a content SMS.


Bulk SMS Integration Java

Sample Code:







public class SMSSender {


   * Send a SMS from "XYZCorp"


   * @param String[] Command line arguments


  public static void main(String[] args) {


    // Declare the security credentials to use

    String username = "my_username";

    String password = "SecrEt12345";

    // Set the attributes of the message to send

    String message  = "Hello World";

    String type     = "1-way";

    String senderid = "XYZCorp";

    String to       = "61400000000";

    try {

      // Build URL encoded query string

      String encoding = "UTF-8";

      String queryString = "username=" + URLEncoder.encode(username, encoding)

        + "&password=" + URLEncoder.encode(password, encoding)

        + "&message=" + URLEncoder.encode(message, encoding)

        + "&senderid=" + URLEncoder.encode(senderid, encoding)

        + "&to=" + URLEncoder.encode(to, encoding)

        + "&type=" + URLEncoder.encode(type, encoding);

      // Send request to the API servers over HTTPS

      URL url = new URL("");

      URLConnection conn = url.openConnection();


      OutputStreamWriter wr = 

        new OutputStreamWriter(conn.getOutputStream());



      // The response from the gateway is going to look like this:

      // id: a4c5ad77ad6faf5aa55f66a


      // In the event of an error, it will look like this:

      // err: invalid login credentials

      BufferedReader rd = new BufferedReader(

        new InputStreamReader(conn.getInputStream()));

      String result = rd.readLine();



      if(result == null) {

        System.out.println("No response received");


      else if(result.startsWith("id:")) {

        System.out.println("Message sent successfully");


      else {

        System.out.println("Error - " + result);



    catch (Exception e) {

      System.out.println("Error - " + e);




The full HTTP/S API documentation details all available features of direct SMS’ Bulk SMS Gateway. For additional help or if you have any questions, please contact our helpful support team.


Like it? Share it!


About the Author

Joined: January 20th, 2020
Articles Posted: 10

More by this author