Drupal Association members fund grants that make connections all over the world.
DOTGO is a service that provides a way of interacting with your web site via SMS. DOTGO is completely free to use, and you can even make money by serving advertisements in your responses. For more information, check out http://dotgo.com.
Essentially, the short code you use to interact with your site corresponds to your top-level-domain (TLD). So, if your web site ends in .com, your short code is 368266 (DOTCOM). Supported TLD's at the time of this writing include DOTCOM (368266), DOTEDU (368338), DOTGOV (368468), DOTNET (368638), and DOTORG (368674).
The first piece of the text message you send to that short code should be your domain name or a full path to an "index.cmrl" file. CMRL is the markup language that DOTGO uses to communicate with your site.
The dotgo package creates a listener at the drupal path "index.cmrl," and through the hook system allows you to define "engines," which is basically a URL that is called by the DOTGO service. The remaining data from the text message is POSTed to that engine URL. You can set up an engine URL to do whatever you want, like create nodes, retrieve content, whatever!
The module also includes a dotgo_auth.module, which supports the auto-generation of tokens that users can authenticate with, so their mobile device is associated with their Drupal user account.
This module requires DOM to be installed (it is included in PHP core, so shouldn't be a problem). Modules that wish to do something should implement hook_dotgo_engine. This hook should return an array of engines, each of which is an array where 'match' => the text message directive that invokes the engine, and 'engine_href' => the path where the engine lives.
If you specify an absolute URL, the index.cmrl "file" will tell dotgo to go to exactly there. If you instead specify a drupal path, the engine will register at "dotgo/THEPATHYOUGAVE." It is recommended you use your module's name here. See dotgo_auth for an example (dotgo_auth is the module name, it is also the engine_href passed). The DOTGO module will automatically listen at dotgo/* and then look for a function called (arg(1)) (that is, if your engine_href is "dotgo_auth" then the engine path is dotgo/dotgo_auth, and the function looks for a function called "dotgo_auth"). It passes that function the POSTed $sys_argument as its parameter.
Probably what you want to do is send a text message back to the user. Currently, you can also set session variables. You use the API to do this. Current API calls include:
- function dotgo_message($content): pass this a string of text and it will be texted back to the user.
- function dotgo_set_session($name, $value, $confirmation = 'OK'): the session variable name, the session variable value, and a confirmation message to text back to the user
Session variables are persistent more or less forever, and are stored by DOTGO. They are then POSTed as another but if you really wanted to you could create a page with PHP input type to do the same thingriable on every request.
For more examples of how this is all utilized, let's look at a module which implements it, dotgo_auth. Note that there are some reserved words that can not be used ever! (Refer to http://dotgo.com/support/documentation/doc0002.1.0/doc.pdf).
The dotgo_auth module provides a new tab on the account page where users can view their auth token. A user of example.com could go look on his user page and get his token, which we'll say is abc123. S/he then can text "example auth abc123" to 368266 (DOTCOM), and the DOTGO service will store their Drupal uid, and post it to every time that user interacts with your site. Currently, a user can only be authenticated with one device at a time, but can re-authenticate to new devices as frequently as s/he wishes.