We need a script to send and receive sms messages written in php. We're actually experienced developers, so if someone just has example code, or some resources we can check out. It's something we would likely rewrite anyway, but need to add the functionality to an upcoming project.
For the sending, you can check a class I wrote. http://www.bytemycode.com/snippets/snippet/647/ But the receiving is going to be way more complex.
Why does receiving have to be complex? If you are receiving SMS through a gateway/aggregator, receiving SMS can be as simple as parsing a GET request. For example (see here): username=abcdefg&ac_password=secret&ac_routine=mo_forwarder&id=MO0000579439&from=447956218236&to=447768254545&date=200503041251&msg=Hello+world.This+is+a+test+message.&country=United+Kingdom Code (markup):
How do these gateways work? Is it possible to skip using one and send the messages directly? If I use a gateway are there any reliable free ones? We may have tens of thousands of messages going out per day here in the next few months.
Free ones? No... I don't think there are even any unreliable free ones. TM4B isn't that expensive though, if you ask me. And the gateway is a simple HTTP request to their server. (Which is what my class does, except for the receiving)
Yeah, but adding up the costs for a few thousand to a few hundred thousand messages a day will add up when it is simply a feature for members and not something critical to our system. I may still check it out though. Thanks for the help thus far.
Well I highly doubt there's a free service. But you could try to set up your own SMS gateway. (I never used it, not sure how exactly it works) http://www.kannel.org/
If it is a feature for your members, you could always make it a value-added optional feature which comes with a cost. If you charge the same cost as that which you are being charged (to reduce the barrier which cost brings), your use of sms could also become an additional source of revenue when your volumes allow you qualify for discounts.
That's actually perfect. We have a cluster of servers right now, so adding one more or even a few more to handle the gateway traffic is fine with me. Thanks, i'll check the system out.
I would look into the sending out MMS messages instead of SMS. The users can send the text message back (pictures, sounds, videos) to a email address. You can use a php based script to check a pop3 email address that you setup and gave to that user. .
The only bad thing is that with MMS you have to learn how to form the MMS messages you sent to the phones and have the FROM portion of the MMS message as the emai you assigned to the user.
That shouldn't be a problem. My in house developer is a pretty amazing programmer. I'll shoot this his way so we can dissect it. Thanks again for the info. This definitely helps.
definitely look into mms. i have a list of providers that tells you what the domain etc is for each e.g. us cellular pm me if you want it