How to send SMS for free using PHP?

Asked

Viewed 32,948 times

13

I wonder if there is any way to send SMS for free to mobile phones in Brazil. I have seen some PHP systems with this function, and I would like to have this function on my system as well.

  • There are several solutions to this, from paid to free, so the question is 'too wide'.

  • Next year (2014) in elections, there will be a lot of people looking for this answer.

  • It’s simple: you need an outside service to do that. maybe limit the question to what services exist, or choose a service and ask how to use?

2 answers

22


In the old days you could run it using the Google Agenda, but always for the same number checked, I used for a while to alert system.

If you really need to send SMS from your system there are two alternatives, both paid:

1) Use a messaging service that will charge you per message. There are several, in Brazil I only know zenvia.com.br (it’s not marketing, I have no relation to the brand).

  • In this case, you would integrate with the company’s system and send messages via the Internet (API). They have modules for various systems, and libraries ready for various languages, properly documented.

2) Using a server-attached modem

  • Solution only when there is local server, I use and come out very cheap. Using a 3G modem, to install on Linux is usually complex. After everything set up, call via CLI, using

    echo '$mensagem' | sudo gammu sendsms TEXT $numero -unicode
    
  • Interesting these options. According to my searches there is a way to use Google Voice. Know something about it?

  • I found your idea quite interesting. Since you said you use it this way you could show us how in more detail?

  • 3

    I did a quick search here, and you can use the application SMS Gateway on an Android smartphone. It exposes an HTTP API that you can call to send the alerts. Then it would just be a matter of leaving the phone constantly on, and exposing it through your router, possibly using a dynamic DNS service. That’s an option as well low budget, and I don’t know about reliability.

  • Very good @Marcoaurélio, I will search about it. Thank you very much.

  • 1

    In the case of Zenvia, they have modules for various systems, and libraries ready for various languages, properly documented. Using a 3G modem, to install on linux is usually complex, after everything configured, I call via CLI, using echo '$message' | sudo Gammu sendsms TEXT $numero -Unicode

1

To send SMS via code what happens basically is that you use an API of some carrier that when sending your request to the same it will trigger a mobile device that will send your SMS.

I do not know any service of this type free national, only paid just contact a carrier of your preference they will release a documentation for you to start using(paying the due clear cost).

If you want international services is possible to find some free, just ask our friend google.

  • Dear War. According to my research there is a way to use Google Voice. Know something about it?

  • 1

    Dataol, currently Google Voice is not allowing this sending of SMS via API. And as you spoke national I imagined that it would not serve. As far as I know national and free does not exist =/

  • 2

    Only I think that sending a Google search without citing examples does not answer the question?

  • 2

    You can try http://www.twilio.com/ . Last time I checked they sent messages to Brazil.

  • OK @Marcoaurolio I will check

  • Traquilo @Viníciusfrance, thanks for the comment

Show 1 more comment

Browser other questions tagged

You are not signed in. Login or sign up in order to post.