Send sms from php using way2sms updated

July 16th, 2011 § 14 comments

Update 2012-01-17 : I just updated the code to send sms. Now you guys don’t worry abt the action param, since the class itself handle it for everyone. I recommend you to disable the warnings, else you will receive lots due to imperfect html provided by way2sms.


Update 2012-01-16 : If you are still not receiving SMS while using the updated code from github, you should probably need to do one more change in code. As I mention in this blog the the parameter Action=abfghst5654g is unique for each user. So you need to find the value of action for your login. You can easily find it by following these steps

  1. Go to and login with your credentials.
  2. GoTo send SMS page.
  3. Inspect webpage with firebug(Firefox) or Developer tools (Chrome).

I will update here, once I update the code to find the value of action for each user.

Thanks Anooj, for notifying this.


1 year before I updated the Ashwin anand’s php code for sending sms from php. later many of them reported that my code too is not work. So now i again updating it and hosting it in Github. You are free to review, fork and edit it. You can download it from github repo.

The change I made from older version is

in classSms.php, line no. 94.
There I updated Action=abfghst5654g after checking in with firebug.Its a hidden field in the home page.
Happy Messaging.

Revath S Kumar [RSK]

- Rubyist / JavaScripter - Yeoman Team member - Open source enthusiast - Blogger @ PHPRepo and - Coder @ Whatznear - Google fanboy - jQuery lover

More Posts - Website - Twitter - Facebook - LinkedIn - Pinterest - Google Plus - YouTube

  • I have read several good stuff here. Certainly worth bookmarking for revisiting. I surprise how much effort you put to create such a wonderful informative web site. Thank you so much for providing such a informative article on this topic. God Bless you.

    • bhagyashri

      hi i m bhagyashri i m devoloing online exam system so i want send sms for register the send so plz send me code

      • This code won’t work anymore.
        The way2sms site is changed alot in these years.

  • Kartik Rajendran

    I have received Invalid Login error message. But Ican login eith the same username and password in What is the problem?

    • It seems have changed their login process and need to update the code.
      will try to update ASAP.


  • kvashok varma

    Thanks for the code, but I am still getting Invalid login, but the same credentials worked with

    • @kvashok : I need to work on that since way2sms have changed login process. @karthik already told me about it. but didn’t get enough time to work on it.


  • The Code has been updated.(
    It worked fine for me now.
    please check and let me know if you are facing any issue.


  • Anonymous

    Deprecated: Assigning the return value of new by reference is deprecated in /nusoap/lib/nusoap.php on line 7381

    I get the above error… Please update it to the new php version…

  • Menaka Menu

    hi im geting invalid login plz tell me how to find the action value ?