An AIM+PHP+SMS lovechild
March 7, 2006 6:22 AM Subscribe
AIM + PHP + SMS = User Validation System?
I'm planning on a launching a new service on the web in the near future. Since certain elements of it will be relatively resource-intensive, I'd like to limit the number of accounts to (roughly) one per actual person.
I'd like to do this ala Gmail, where you tell Google your mobile phone number, they text (SMS) you a verification code, and you enter it in. I see that there are a few services for sending SMS messages over HTTP by embedding fun times in the URL through their APIs, but you have to pay for each message. And they're all, sorta... British.
AOL now lets you send SMS messages to anyone you damn well please, so my question is, is there an easy way to send an AOL instant message from PHP or another script? I'm sure you can, (hence the spambots) but I can't figure out what method I might use. I'm looking into so-called "AIM links" (aim:goim?screenname=, etc.), but they seem to only be a mechanism for an end user to launch their AIM client and prep an outgoing message. If I could use PHP to send a command to GAIM or some other Linux-based AIM client, that'd work too.
Does anyone have any experience with this? Or am I just better off taking the hit and going the SMS-API route? I see AOL offers their AIM Custom Client documentation & API, (which blew my mind, considering how they used to treat Trillian back in the day)... so I suppose I could throw together a bare-bones, command line AIM client that was able to receive inputs from my PHP script... perhaps...
But, if there's any other way to send AIM messages through a PHP script, (or free SMS messages via some other means), that's definitely preferred. Thanks for listening to my far-too-tired rambles...
I'm planning on a launching a new service on the web in the near future. Since certain elements of it will be relatively resource-intensive, I'd like to limit the number of accounts to (roughly) one per actual person.
I'd like to do this ala Gmail, where you tell Google your mobile phone number, they text (SMS) you a verification code, and you enter it in. I see that there are a few services for sending SMS messages over HTTP by embedding fun times in the URL through their APIs, but you have to pay for each message. And they're all, sorta... British.
AOL now lets you send SMS messages to anyone you damn well please, so my question is, is there an easy way to send an AOL instant message from PHP or another script? I'm sure you can, (hence the spambots) but I can't figure out what method I might use. I'm looking into so-called "AIM links" (aim:goim?screenname=, etc.), but they seem to only be a mechanism for an end user to launch their AIM client and prep an outgoing message. If I could use PHP to send a command to GAIM or some other Linux-based AIM client, that'd work too.
Does anyone have any experience with this? Or am I just better off taking the hit and going the SMS-API route? I see AOL offers their AIM Custom Client documentation & API, (which blew my mind, considering how they used to treat Trillian back in the day)... so I suppose I could throw together a bare-bones, command line AIM client that was able to receive inputs from my PHP script... perhaps...
But, if there's any other way to send AIM messages through a PHP script, (or free SMS messages via some other means), that's definitely preferred. Thanks for listening to my far-too-tired rambles...
Best answer: Many mobile providers allow you to send a text to someone's phone via email. The user pays to receive the text (standard text message charge, for most) and the sender doesn't pay a penny.
Effectively, each phone has a unique email address. Most addresses are in the form mobilenumber@mobileprovider.com though the format varies from provider to provider. For example, SprintPCS is phonenumber@messaging.sprintpcs.com. Therefore, you'll need to ask the user which network they are using before sending the text message. Here's a fairly exhaustive list of all the gateway formats.
I'm pretty certain this is the system that Basecamp uses to send out text reminders from their web application. The downside is that this doesn't work for EVERY provider: for example, from memory some Vodaphone subsidiaries don't allow this automatically: you have to sign up for their Vodaphone.net service first. Maybe try this method for each user first and if it doesn't work then send them a paid-for text?
posted by blag at 7:02 AM on March 7, 2006
Effectively, each phone has a unique email address. Most addresses are in the form mobilenumber@mobileprovider.com though the format varies from provider to provider. For example, SprintPCS is phonenumber@messaging.sprintpcs.com. Therefore, you'll need to ask the user which network they are using before sending the text message. Here's a fairly exhaustive list of all the gateway formats.
I'm pretty certain this is the system that Basecamp uses to send out text reminders from their web application. The downside is that this doesn't work for EVERY provider: for example, from memory some Vodaphone subsidiaries don't allow this automatically: you have to sign up for their Vodaphone.net service first. Maybe try this method for each user first and if it doesn't work then send them a paid-for text?
posted by blag at 7:02 AM on March 7, 2006
Buy a cheap-o phone with T-Mobile and getting their unlimited SMS plan, just make sure it connects to a PC easily via bluetooth or USB. Then get NowSMS and there you have it, your own SMS gateway.
posted by riffola at 7:13 AM on March 7, 2006
posted by riffola at 7:13 AM on March 7, 2006
The company I work for offers this, though more normally the authorising token is embedded in a premium-rate message, so it's a payment mechanism as well as an authentication mechanism (something you might want to consider).
There are UK-based SMS providers that offer mobile-terminated SMS in the US, but I hesitate to name them for obvious reasons. Per-message costs should be very cheap - around 4/5p per message - and they should offer you example source code.
You could turn the problem around and go for inbound SMS instead of outbound. Have the end-user text a password to you, then log into your site with their mobile number and password they just sent. Either receive the incoming SMS through an SMS gateway, or use a GSM modem (be warned, SMS interoperability between the US and the rest of the world is poor). In theory, with the cost of the SMS being borne by the end-user it should be cheaper for you.
In a similar vein, with some free PBX software and a phone line you could call the end-user's phone and have them key in a PIN to authenticate their phone. The advantage here is that it will work world-wide.
If you go the AIM route, bear in mind that it may break at any moment. ICQ used to offer free SMS, and their messages were eventually blocked from entering almost every network on the planet. According to their site, you can currently send to Australia, Canada, Israel and Singapore.
posted by Leon at 7:26 AM on March 7, 2006
There are UK-based SMS providers that offer mobile-terminated SMS in the US, but I hesitate to name them for obvious reasons. Per-message costs should be very cheap - around 4/5p per message - and they should offer you example source code.
You could turn the problem around and go for inbound SMS instead of outbound. Have the end-user text a password to you, then log into your site with their mobile number and password they just sent. Either receive the incoming SMS through an SMS gateway, or use a GSM modem (be warned, SMS interoperability between the US and the rest of the world is poor). In theory, with the cost of the SMS being borne by the end-user it should be cheaper for you.
In a similar vein, with some free PBX software and a phone line you could call the end-user's phone and have them key in a PIN to authenticate their phone. The advantage here is that it will work world-wide.
If you go the AIM route, bear in mind that it may break at any moment. ICQ used to offer free SMS, and their messages were eventually blocked from entering almost every network on the planet. According to their site, you can currently send to Australia, Canada, Israel and Singapore.
posted by Leon at 7:26 AM on March 7, 2006
This thread is closed to new comments.
You can set up a SMS message in AIM by putting the phone number in the "to" field of a message. What I'd do if I were you is grab the Net::AIM perl module, or a similar module in another language, and write an AIM bot. The bot will keep a persistent connection to AIM, otherwise the service will boot you for connecting/disconnecting. Make it poll a database, text file, or some other resource for new phone numbers to send messages to. Catch the default returned message, and if anyone decides to reply to your bot, store that for later review just in case.
Your basic workflow will be:
1. User signs up on the website
2. Web script puts number in the "to be messaged" queue
3. Bot (or group of bots) polls the queue and grab available numbers to message
posted by mikeh at 6:46 AM on March 7, 2006