Question

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.

Was it helpful?

Solution

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.

OTHER TIPS

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

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.

The website http://www.freesmsgateway.info/ can provide the correct email address given a valid cellphone number (at least in the USA).

However I don't see any information about providing an API. You might, however, still be able to parse and use the results.

EDIT - I see they use an API from http://www.data24-7.com/ to power their site. Data24-7 claims to provide "real time API's".

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top