How to send SMS from my website? Only sending SMS is required, not receiving [closed]
Asked Answered
W

1

5

I want to send SMS to a group of phone numbers in my database, from my website.

Can you please guide me on how to do it, which are the best and reliable SMS api in php which I can integrate?

I want to send SMS only in India, if anyone has experience in this please do reply.

Weintrob answered 22/6, 2011 at 11:21 Comment(2)
Hello and welcome to StackOverflow. Note that asking for shopping recommendations ("what is the best X for low cost?") is not really in scope for this site.Merle
how about routesms? they answer to your requirement and they are from india.Disposed
R
7

Answer 1: This is a pretty nice sms API: http://www.clockworksms.com/

Answer 2: This isn't an API solution, but more of an overview how you can quite easily build your own solution with PHP5. To send an sms to a phone, all you have to do is email the message to the phone number. The email address is just the phone number and carrier domain.

  1. Determine Carrier
  2. Determine domain for carrier
  3. Construct email address
  4. Send email

Determine Carrier The carrier can be determined by the area code and first 3 numbers. I don't know any APIs off the top of my head (I'm sure they exists though), but if you wanted to go the custom route you can sort of build your own. For example, this site has an input where you can determine carreir: http://www.telcodata.us/search-area-code-exchange-detail

But it's just posting the data, so you can figure it out by passing your own parameters. for example: ww.telcodata.us/search-area-code-exchange-detail?npa=323&exchange=249

Determine Domain Each carrier has their own domain for text. For example, AT&T is @txt.att.net while Verizon is @vtext.com.

Here is a list of carrier domains: http://www.emailtextmessages.com/

Construct Email Example: if an AT&T number is (510) 123-4567 you can send an sms to the number by emailing [email protected].

Rosalindarosalinde answered 22/10, 2012 at 22:28 Comment(5)
Your second solution is very interesting. I just did a quick search and found a handful of services that offer API carrier lookup. This actually looks like a nicer solution than the paid SMS services, unless you need to send SMS messages in bulk.Pellucid
I know this is old, but i thought it'd be useful to point out determining a carrier is not possible in every case. I brought my phone number with me from att to verizon, so determining my carrier using the area + n numbers doesn't work.Fluffy
@Bryan: Good point. If a user ports their phone number, you can't always tell which carrier they currently use. I'm curious: what percentage of mobile users have a ported number that originated with a different character.Rosalindarosalinde
What if you skip step 1 and 2 and send the email to all carriers? Wrong carriers would ignore you and you're sure to hit the right one. My concern is, would they eventually ban you for sending bad numbers?Stomatitis
@Bad Programmer: I am currently making a research on android sms, sms gateways etc. I would like to know if charges will be applied to the receiver of the sms for Answer 2? Thank you.Tamah

© 2022 - 2024 — McMap. All rights reserved.