Send SMS using Way2SMS PHP API


September 9, 2012PHP5 Comments

Way2SMS is a popular free sms service in India that offers users to send SMS to mobile numbers using internet.The service is reliable and delivers the SMS in few seconds but there is no public API available for Way2sms. But Unofficially there is an API which communicates with Way2sms and most important thing is this API still works unlike many others.


Image Source

There are many others ways to send sms online using java but this one is using the PHP CURL option.

Let us see how to use the API to send SMS to mobile numbers using PHP.


1.Download the Api from Github

2.Create a folder and place the way2sms-api.php file

3. The API uses the sendsms function that needs four parameters

sendWay2SMS($uid, $pwd, $phone, $msg)

First two parameters are userid and password of your Way2sms account.

You can send to multiple mobile numbers or a single recipient.

The last parameter is the actual message that you wish to send.


You can copy these files in your server in order to use this as web service.Design a form to accept all the parameters and invoke this

web service to send sms easily.

5 Responses to “Send SMS using Way2SMS PHP API”
  1. Hemant

    its saying invalid login

  2. hardik

    this error appear set user id and password
    Parse error: syntax error, unexpected ‘”7203887400″‘ (T_CONSTANT_ENCAPSED_STRING), expecting variable (T_VARIABLE) in C:\xampp\htdocs\php\way2sms-api.php on line 139

  3. ilakk

    invalid login error throw

  4. chinna

    hello bro

    i want to know how to fill a field in website and submit it using php

    im taking about an free sms sending website it will not display any ads when we send sms

    so if we can auto fill the fields using php we can use that website

    please replay to my mail

  5. Mukunda Naik M H

    Not working

Leave a Reply