-1

I would like to add a "Text Me" form to my website that will allow users to type their Name, Phone Number, and a Message that i receive on my phone via SMS. I would prefer something easy and free, perhaps a code snippet. Does anybody have any suggestions for a "Text Me" form or a service that provides one?

3 Answers3

0

A quick google-search reveals (at least for German) customers: lox24.eu - they have a VERY simple way for sending SMS:

https://www.lox24.eu/API/httpsms.php?konto=<yourId>&password=<yourPassword>&service=<yourTariff>&text=<SMSText>&from=<yourSender>&to=<receivingNumber>

All you have to do, would be creating a short text from the $_POST variables of your form and then do a HTTP-request (preferrably cURL) from within the PHP-page that receives the form-data.

You might try to google for "websms api" to find a SMS-gateway in your country that provides the services you need.

HTH

^KMP

0

I recommend If This Then That. You can hit a simple web backend, supplying a JSON payload, and IFTTT will then send an SMS to your cell with the payload text, or whatever text you want.

Maker channel: https://ifttt.com/maker

SMS channel: https://ifttt.com/sms

IFTTT will abstract away the specifics of how the text is sent (doesn't matter what carrier, what country, etc.) and it will (probably) break the text into properly sized chunks. If not, you might have to do that yourself, though - just use substr() to divide the text payload into chunks of 160 characters and hit the backend as many times as necessary for the message to be sent.

You can use raw cURL to hit the backend, but I find that Guzzle is a great PHP library for making web requests of any kind.

Jeff
  • 789
  • 4
  • 13
0

A lot of mobile carriers in the US (not sure about abroad) will have a text equivalent email. For example, AT&T will text you if you send an email to yourmobilenumber@txt.att.net. Its free.

Landen
  • 489
  • 1
  • 5
  • 8