954,576 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Free SMS with Sockets - No provider?

Does anybody know how I would use sockets to tap into the SMS protocol for sending+receiving SMS messages. Basically, all I want to be able to do is setup a php script that will be able to act as the SMS server and send+receive the SMS's directly through the SMS network. But I don't want to send it to an sms provider as I'm trying to make my script the sms provider. Does anybody know how to do this because I don't even know how the sms protocol works.

cwarn23
Occupation: Genius
Team Colleague
3,033 posts since Sep 2007
Reputation Points: 413
Solved Threads: 259
 

cwarn23,

I doubt you'll find a free SMS service. The usual approach is to find a gateway provider or broker that has the kind of service your after.

__avd
Posting Genius (adatapost)
Moderator
8,648 posts since Oct 2008
Reputation Points: 2,136
Solved Threads: 1,241
 

Well now that you mention gateway provider, I guess you would say that this script I'm after acts as a gateway provider and has no external dependencies. I just need to know how.

cwarn23
Occupation: Genius
Team Colleague
3,033 posts since Sep 2007
Reputation Points: 413
Solved Threads: 259
 

Couldn't you send emails using the wireless provider's gateway?
[email]usernumber@wirelessprovider.tld[/email]?

codejoust
Junior Poster
180 posts since Jul 2009
Reputation Points: 18
Solved Threads: 21
 
Couldn't you send emails using the wireless provider's gateway? [email]usernumber@wirelessprovider.tld[/email]?


Well the thing is that theoretically it should be possible for php to send the SMS without any external dependencies including email and curl. I know that sockets would be involved. But the question is how to make a custum function library the sends+receives SMS's just like how the mail() function sends emails without another company involved. And I know that I should be able to do this intirerly in php as sockets is designed for this sort of stuff.

So in basic I'm looking for a php script that sends and receives SMS messages where php directly communicates with the SMS protocol (not an api) and no external server, no external companies and no email involved.

cwarn23
Occupation: Genius
Team Colleague
3,033 posts since Sep 2007
Reputation Points: 413
Solved Threads: 259
 

I haven't heard of such a script and I was searching hard for one a couple of years ago when setting up a school contact subsite. Everything I've seen boils down to gateway providers. I'd be v.v. interested in a script. I think everybody would be. No need for a Blackberry!

diafol
Rhod Gilbert Fan (ardav)
Moderator
7,792 posts since Oct 2006
Reputation Points: 1,170
Solved Threads: 1,080
 
codejoust
Junior Poster
180 posts since Jul 2009
Reputation Points: 18
Solved Threads: 21
 

Here is something simple, but still would cost money. This type of service will never be free.

http://invalid.name/wiki/index.php/Setting_up_an_SMS_Gateway

kkeith29
Nearly a Posting Virtuoso
1,357 posts since Jun 2007
Reputation Points: 235
Solved Threads: 194
 

OMG I CAN'T BELIEVE THIS!!!
I followed the wikipedia link codejoust posted and found another wikipedia link in that page SMPP Protocol which lead me to the official open source protocol for SMS. It is written in Java but I shall be the first to convert it to php. So it is totally possible to send free SMS and will republish code when finnished as the licence says I'm allowed to redistribute it as long as it has their copywrite notice. This is so exciting.

cwarn23
Occupation: Genius
Team Colleague
3,033 posts since Sep 2007
Reputation Points: 413
Solved Threads: 259
 

You really think cellphone companies are going to let you send free messages through their equipment. Not going to happen.

SMS providers buy a bulk of messages from those companies at a discounted rate. Then they resell them, adding some to the price so they can make some money. It won't be possible for you to do this for free.

kkeith29
Nearly a Posting Virtuoso
1,357 posts since Jun 2007
Reputation Points: 235
Solved Threads: 194
 

Hmm, from what I've read you need a licence - the networks won't give you this - just as KK says. You'll probably find that the cost per SMS will be too high to consider. You're probably better off buying a service, although that probably defeats the object of what you're trying to achieve.

diafol
Rhod Gilbert Fan (ardav)
Moderator
7,792 posts since Oct 2006
Reputation Points: 1,170
Solved Threads: 1,080
 

If it's not free then why is there an open source script for this protocol written by the founders of SMPP? You can check their website at http://opensmpp.logica.com/

cwarn23
Occupation: Genius
Team Colleague
3,033 posts since Sep 2007
Reputation Points: 413
Solved Threads: 259
 

The ability to use the protocol is free, the ability to use the cellphone companies towers to send your messages is not.

kkeith29
Nearly a Posting Virtuoso
1,357 posts since Jun 2007
Reputation Points: 235
Solved Threads: 194
 
The ability to use the protocol is free, not the ability to use the cellphone companies towers to send your messages.


Now I get ya. Because that's why some phone companies have better mobile coverage than others. Because they only own certain towers where as I would own no towers which means I would get zero reception and that's useless. O'well, it was a nice idea while it lasted.

cwarn23
Occupation: Genius
Team Colleague
3,033 posts since Sep 2007
Reputation Points: 413
Solved Threads: 259
 

Please note that the free SMS gateways both seem to be in India. way2sms appends advertising onto text messages that they send. 160by2 may do the same (that's why it's free). User beware.

chrishea
Nearly a Posting Virtuoso
1,428 posts since Sep 2008
Reputation Points: 210
Solved Threads: 230
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: