PHP Classes
elePHPant
Icontem

File: manual.txt

Recommend this page to a friend!
  Classes of Dave Smith  >  PHP dotGo Engine  >  manual.txt  >  Download  
File: manual.txt
Role: Documentation
Content type: text/plain
Description: Documentation
Class: PHP dotGo Engine
Interact with SMS messages sent to your site
Author: By
Last change: Added mobile emulator
Date: 3 years ago
Size: 5,695 bytes
 

 

Contents

Class file image Download
Class: dotgo
Version: 0.1 beta 10/23/2015

web service documentation at http://dotgo.com/Support/Documentation/

Copyright 2015 Wagon Trader, All Rights Reserved


Description:

Create an interactive web based sms (text messaging) service on your web site using the dotgo web services.

You must have your own domain with a .com, .net, .org, .edu or .gov extension.

You must have access to a mySQL database.


Files:

dotgo.class.php - Main class

dotgo.admin.php - Administration class

dotgoem.class.php - Dotgo mobile emulator

dotgo.engine.php - Response engine

admin.php - Administration script

test.php - Simple engine test script

emulate.php - Sample mobile emulation interface

index.cmrl - dotgo concise message routing language file

dotgo.table.sql - Data structure for mySQL table


Installation:

Upload files to a web accessible location on your server (eg. public_html)

Create a mySQL table to store message paths. You can use the included dotgo.table.sql file to import the
table fields using phpMyAdmin or your favorite database manager.

It is recommended that you change the name of admin.php to something only you know to prevent a brute force
hacking attempt.

Configuration:

Set the correct URL path in the index.cmrl file to the engine. <engine href="http://yourdomain.com/dotgo.engine.php"/>
    yourdomain.com would be your real domain name. This must be the full path, so if you have included this
    package in a folder, you need to specify the full path. If you are redirecting all traffic to the sub-domain
    www, then you need to specify the sub-domain in the url... www.example.com, for example.

Set your own secret access key in dotgo.admin.php by changing the value of the $adminKey property.

Configure the following properties in dotgo.class.php for your setup...

$dbHost - Your database host, localhost normally works fine if the database is hosted on the same server
    as your domain.

$dbUser - The username to access the database.

$dbPass - The password to access the database.

$dbName - The database name which contains the mySQL table.

$dbPort - The port to access the database, normally set to null for default

$dbSocket - The socket to access the database, normally set to null for default

$tableName - The name of the database table to store the message paths. dotgo_path is the default, change
    this value if you set up a different table

$designator - The name of your domain without the extension, so example.com would be 'example'.

$channel - The dotgo channel to use. This is related to your domain extension, example.com would be
    DOTCOM (368266) and example.net would be DOTNET (368638). Available channels are listed in the class.


Usage:

admin.php (hopefully you changed the name to something else) is the interface to set up keyword paths and their
responses. You will need to initialize the admin session by providing your secret key by pointing your browser
to admin.php?key=yoursecretkey, using the correct script name and key you set up.

Users will access your content by text messaging your domain name plus keywords to the channel for your domain
extension. Suppose they text... example hello ...to 368266 (which is dotcom on the dial), dotgo will access
example.com and post the argument 'hello'.

Using the administration interface, you set up a keyword 'hello' to return message content of 'Hello, welcome to my site'.

dotgo will receive the response you set up, 'Hello, welcome to my site' and text message it back to your user.

Suppose your user texts 'example hello world' to dotcom...

If you have set up a child keyword to hello, so that the keyword path is hello -> world, to return message content
of 'Hello back to the world', then dotgo would return that message back to the user.

Content types:

message - the simplest response. It will return the content as a message back to the user.

query - return a different path. You can set up a root keyword 'world' as a query with the content 'hello world'.
    dotgo will query the engine as if the user supplied 'hello world', returning your message content 'Hello, welcome 
    to my site' to them.

custom content - returns content exactly as written. This is an advanced feature that must contain properly formatted
    cmrl. You would use it to supply instructions to dotgo using <block>, <keyword>, <input>, etc... tags. Refer to 
    the dotgo documentation to understand how these advanced features work.

rss feed - url to an rss feed. dotgo has internal processing for rss feed responses.

engine - url to another engine. dotgo will send the request to the specified engine.

Set up as many keyword paths as you want, however best fits your needs.

Reserved words:

dotgo has reserved the following words for their own internal processing and can not be used as keywords...

'follow'
'unfollow'
'register'
'unregister'
'subscribe'
'unsubscribe'
'stop'


Mobile emulator

Included is a script to emulate DOTGO SMS messages on a web site. This script will allow your users who do not
have access to mobile short code phone numbers to still interact with your, or any other, website by emulating
the SMS system.

Testing:

You can run the included test.php file to make sure your database is set up and that you are getting a response. Submit
requests for message responses only since this test script is not capable of emulating the advanced features of dotgo.

You can test your engine live by using your own cell phone or avoid messaging fees by using the included emulator or use
dotgo's simulator located at http://dotgo.com/Publishers/Resources/DOTGOSimulator/


Changelog

0.1.1 beta

Added emulator

0.1 beta

Initial beta release