tags:

views:

32

answers:

3

I want to create a PHP app that can send text messages. There are different gateways for different email carriers. Is there any library I could use that would be able to lookup or detect which gateway to use just by passing the phone number into it? This way I can take whatever email address I get out and use PHP's email functions to send a message. Thanks in advance!

+1  A: 

There are companies that provide a lookup service, but it's generally not free (for example, we've used mBlox for this). There's no simple algorithm you can use, either, because of number porting and so on.

Dean Harding
Thanks, after some poking around, it looks like there is no easy way to do it. I will just have the user enter in their provider. Thanks :)
Paul
A: 

Zeep Mobile offers a free SMS API you can use, the catch is they tag your SMS with ads

Phill Pafford
A: 

There are a few SMS APIs out there that allow you to send without using an e-mail gateway. Twilio would be my recommendation. Using one of them you wouldn't have to even know the carrier.

As for detecting the carrier, codeka is right, there's no real way to know. Even google maps has a carrier select box.

Tim Lytle