473,382 Members | 1,646 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Send SMS

114 100+
Dear All,

Is there any php script or any procedure so that I can send sms to any mobile in india?

How can I do that?

Please help me........

Thanks
Deepak
Apr 3 '07 #1
6 4106
xerc
14
Well, first you have to identify how you are going to send the SMS and from where. There are three basic options.

1) Email-to-SMS. Most mobile providers allow you to send an e-mail to a phone number, which then forwards it as an SMS. So for instance 2230492098@wirelessprovider.com. The problem with this method is that not all wireless providers allow this (particularly for prepay SIMs). Moreover, if you find most of your recipients can receive via this method, you still have the pain of figuring out the e-mail to use. But, if you have a static and limited set of recipients, and their mobile providers provide an e-mail-to-sms option, then this is by far the easiest. You'll just use the regular mail() function in PHP to send them an SMS. I should note there are some free SMS services out there (you send an e-mail with the number in the subject and text in the message), but unless you want yourself and your recipients to get SMS spam, I'd avoid these.

2) SMS Gateway. Most of the time, however, you have to set up an account with a wireless SMS gateway provider, such as Clickatell or BulkSMS. (Just Google them.) These gateways give you an HTTP API or other API with which to interface; once you set up an account. Some even have PHP classes they provide as a sort of 'software' you can use in your application. Obviously you have to pay per message, but hey, SMS isn't free, so you should be expecting to pay somewhere and somehow. The cost is generally pretty cheap, and often there are plans with no recurring fees -- just pay as you use. The API is going to vary from provider to provider, but before paying and opening an account, be sure you can interface. For instance you may need to have a static public IP address if using the HTTP API. So how you interface in PHP will depend upon the provider and what software, API, etc. they provide. Some allow telnet, others require URL post, etc. etc., but I've found these all extremely easy to implement using PHP. Not much more difficult that mail(), but you'll have to read their documentation. You should also check that the gateway provider can successfully send an SMS to a number of wireless providers in your country. Some can't at all, while others will say they can SMS to a country, but the reality is they can only SMS to one wireless provider out of like 5. So again a little research needed.

3) GSM Modem. I don't really recommend this method unless you are doing something quasi enterprise level, have the time to manage the infrastructure, as well as the patience to interface a lot of hardware and software. But basically, you can slap a wireless GSM modem (MultiTech, Wavecom, etc.) onto your computer or server -- and of course you'll need an activated SIM card with SMS capability. You'll then need a way to interface/communicate with the modem. If you have the patience to learn AT commands and communicate with a COM port, more power too you. Otherwise, you'll need to purchase some form of middleware like NowSMS or ActiveSMS (http://www.intellisoftware.co.uk/products/activesms/) These run as mini-servers or services on your machine and do nothing but process outgoing and incoming SMS messages from the GSM modem. How you then interface with these SMS servers/services will depend upon the program you purchase. Some all command line (exec()), others support an HTTP API, and others still will accept e-mail. Again, do a little research before purchasing. The nice thing about this method is you have complete control. I find messages go out a lot faster than through a gateway. Moreover, you have instant two-way (send and receive) capability on your machine. The downside is that you should remember it takes a modem about 8-12 seconds to send an SMS message, so if you need 'broadcast' capability, go with a gateway. Otherwise you'll have to buy multiple modems per machine.
Apr 3 '07 #2
xerc
14
I forgot to add. While I reference GSM modems in option three, you could in fact use CDMA or other, but most software to interface with the modems only support GSM. I'm not an expert, but I've read that the AT command set for GSM is pretty standard, so a GSM modem is a GSM modem. The AT command set for CDMA, however, is not terribly standard, so it is difficult for software developers to account for all the AT differences between hardware and network. That being said, if you are rolling your own program to interface with the modem, then you could certainly go CDMA. Also, a modem is basically the mobile phone without the interface (screen and key pads). You therefore could in theory connect some mobile phones directly to a computer and SMS that way. I know a lot of Nokia phones come with software to do just that. I don't know if the software is open enough to send command lines through PHP and/or the performance of phone sets vs. modems. But in theory...........

Finally, just to give you a sense, modems cost around $300 USD a pop.
Apr 3 '07 #3
coffear
20
touchring some SMS gateways allow 2 way SMS messages. Clickatell for example have this facility (of course it costs)
Nov 11 '07 #4
hi xerc i am subscribed to Clickatell all the things are working perfectly..
but i want automatic sms send option if the date&time so and so..
now i am developing my website in yii And Php please reply me(vigsacet@gmail.com) if u have any ideas..

thanks
Jun 5 '12 #5
you need to buy sms gateway api from any of the service providers... just google it you will get list of service provides who offer international sms, per sms cost vary from country to country.
Jun 5 '12 #6
Ozeki NG SMS Gateway can be also used to send and receive SMS messages. It provides PHP API as well. But it just one of the several development options provided the software. It isn't needed to build any unique application, Ozeki NG SMS Gateway provides complete 2-way SMS/MMS communication solution.
Feb 20 '14 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

15
by: Steve Horrillo | last post by:
I can't figure out why this script won't insert the subject in the email and why can't I control the font and size being used? I'm not sure where to post this. Let me know where if this is OT. ...
0
by: zhimin | last post by:
Hi, I'm writing a program to send large file(100m) through dotnet using TCPListener & TCPClient, I'm sending the file with a ask and response loop: 1. Client send a flag 1 to server indicate it...
6
by: John J. Hughes II | last post by:
I have a service that needs to send e-mail alerts. I have been attempting to use the System.Net.Mail function from .NET but this seems to require the IIS be installed and running. Since some of...
13
by: Manfred Braun | last post by:
Hi All, I am trying to understand the blocking method socket.Send(). The call blocks as expected, but does this mean, it returnes after the underlying TCP layer got a confirmation, that the send...
3
by: Gerard | last post by:
Hello I have created a windows service to monitor a database, it starts some checks when a timer elapses. The checks send emails depending on their findings. My issue is that when I created a...
14
by: supz | last post by:
Hi, I use the standard code given below to send an email from an ASP.NET web form. The code executes fine but no Email is sent. All emails get queued in the Inetpub mail queue. I'm using my...
3
by: ultr | last post by:
Hello, I have read that send() may not send whole message and returns the nuber of bytes sent, so that we can handle the rest of the message. Is it true, because i have tested sending even 1MB...
11
by: hazz | last post by:
smtpClient.Send(message) is causing me problems as per specifics in the trace below. Email is sent but not without this error typically upon sending the second email, but sometimes when running...
15
by: cj | last post by:
How can I get a button in VB to send the contents of a text box via email in a manner similar to the "Send To\Mail Recipient" functionality that you can select via right clicking a file in Windows...
4
by: =?Utf-8?B?dHBhcmtzNjk=?= | last post by:
I have a web page that at the click of a button must send a bunch (1000+) emails. Each email is sent individually. I have the code working fine, using Mail Message classes and smtp and all that. ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.