WHAT IS “GEO-TEXTING”?
|
(def) “Geo-texting” – (verb) the act of inviting people via text to share their location realtime with each other on a private geomap…uberstyle. Anyone with a smartphone and can text to the geo-text phone number can play dispatcher and invite people to share a geomap. To set up your own geo-text your own environment, you’ll need to host this plug-in, my latest script PHP Uber-style Geotracking and Twilio’s SMS “texting” services (www.twilio.com). You can try it out NOW in my demo environment here. Just text commands (below) to 415-360-0886 – Click here or on “Live Demo” link above to get the full list of commands. QUICK START EXAMPLE: text the command ‘list-maps’ to 415-360-0886 on your phone now, it should say you have no maps. Create a map and invite some people to track – text a comma or a space delimited list of phone numbers or email addresses to 415-360-0886. These numbers and email addresses will receive an email or text where there is a link than when clicked on using a smartphone will be tracked in a private geomap.) |
WHAT DOES THIS TWILIO “GEO-TEXT” PLUG-IN DO?
This geotext plug-in is an SMS text front-end (leveraging Twilio) to my original geolocation script – PHP Uber-style GeoTracking script.
This Twilio “Geo-text” plug-in is an add-on to my PHP Uber-style Geotracking script that allows anyone with access to your Twilio phone number to invite people via text to share their location with others uber-style on a private geomap. In addition the script features dispatcher functionality not found in the original geotracking script. This functionality includes managing multiple geomaps, adding/deleting geotrackees, renaming maps and geotrackees, pinging geotrackees to update their location, all from a smartphone using SMS texting.
The script is easy to install – just unzip contents – 1 file – into the <root>/php/sms folder of your original PHP Uber-style Geotracking instalation. This requires a Twilio account to send and process SMS texts. Configuration instructions to link your Twilio phone number to this plug-in appear below.
NOTE: THIS SCRIPT IS AN ADD-ON AND REQUIRES THE PURCHASE OF MY PHP UBER-STYLE GEOTRACKING SCRIPT. THIS ALSO REQUIRES SIGNING UP FOR A PAID TWILIO ACCOUNT.
This script includes PHP code that CAN BE USED BY PHP DEVELOPERS AS A TEMPLATE for using SMS TEXTING (using Twilio) as the user interface for their software/web applications. For PHP developers who have not explored SMS texting as a user interface for your software (as I’ve done here), it is worth exploring. Texting is something everyone knows how to do (young, old and in between) and cuts learning curve of using your software. (see “Overview of PHP Code” section below for how code is structured).
QUICK DEMO/START
Using the plug-in is as easy as texting a list of geotrackees to the script’s twilio phone number (or for demo – 415-360-0886). Click on “Live Demo” link above for more detailed instructions.
| LIST OF COMMANDS | DESCRIPTION |
| help-me or hm | get help or list of commands text: “help-me” |
| clear-all or ca | clear all my maps and geotrackees text: “clear-all” or “ca” |
| new-map or nm | create new map text: “new-map” or “nm” |
| list-maps or lm | list all my maps text: “list-maps” or “lm” |
| rename-map or rm | rename existing map text: “rm 2 My Map” |
| switch-map or sm | switch active map text: “switch-map 3” |
| delete-map or dm | text: “delete-map 2” |
| add-geotrackees or ag | add geotrackees to the active map (default) text: “ag newuser1@saas1.us 4154444444” |
| list-geotrackees or lg | get list of geotrackees in active map text: “list-geotrackees” |
| delete-geotrackee or dg | delete geotrackee text: “dg 4” |
| rename-geotrackee or rg | create nickname for a geotrackee text: “rename-geotrackee 2 Cool Dude” |
| ping-geotrackees or pg | ping all geotrackee to update location text: “pg 1,2,3” or “pg all” |
or simply type in a comma separated (”,”) list of email addresses and phone numbers directly to invite people to an active geotracking map |
OVERVIEW OF PHP CODE
With this script comes a “template” PHP class that can be used as a starting point for PHP developers to create other conversational Twilio SMS applications. See below documentation of this PHP class.
CLASS SYNOPSIS
class smsGeotracker {
// Properties
private $twilioFrom; // phone number of “texter”
private $twilioBody; // body of the text
private $twilioAccountSid; // Twilio Account Sid
private $twilioAuthToken; // Twilio Auth Token
private $twilioPhoneNumber; // Twilio Phone Number
private $sessionActiveMap; // mapkey for current active map
private $db; // handle to database db
private $urlRoot; // url of script
private $background; // background color of geotrackee icon
private $letter; // assigned geotrackee letter
private $headers; // email headers<
// Methods
public function getTwilioFrom()
public function setTwilioFrom($twilioFrom)
public function getTwilioBody()
public function setTwilioBody($twilioBody)
public function getUrlRoot()
public function setUrlRoot($urlRoot)
public function getLetter()
public function setLetter($letter)
public function getHeaders()
public function setHeaders($headers)
public function getBackground()
public function setBackground($background)
public function getTwilioAccountSid()
public function setTwilioAccountSid($twilioAccountSid)
public function getTwilioAuthToken()
public function setTwilioAuthToken($twilioAuthToken)
public function getTwilioPhoneNumber()
public function setTwilioPhoneNumber($twilioPhoneNumber)
public function getSessionActiveMap()
public function setSessionActiveMap($sessionActiveMap)
public function getDb()
public function setDb($db)
public function getGeotrackeeCount() // get geotrackee count
public function getGeotrackeeTable() // assemble geotrackee table for email
public function generateRandomKey($length = 10) // generate random key
public function validatePhone($phoneNumber)
public function getMode() // get current mode of operation
public function getArg($argNo) // get n-th token from command (text body)
public function getMapkey($arg) // get mapkey of active map
public function getMapname($arg) // get mapname of active map
public function getMapCreated($arg) // get created date of active map
public function sendSms($to, $msg) // send sms back to “texter”
public function getActiveMap() // get active map info
public function doHelpMe() // do “help-me” command
public function doListMaps() // do “list-maps” command
public function doClearAll() // do “clear-all” command
public function doActiveMap() // do “active-map” command
public function doSwitchMap() // do “switch-map” command
public function doDeleteMap() // do “delete-map” command
public function doAddMap() // do “add-map” command
public function doRenameMap() // do “rename-map” command
public function doListGeotrackees() // do “list-geotrackees” command
public function doDeleteGeotrackee() // do “delete-geotrackee” command
public function doAddGeotrackees() // do “add-geotrackee” command
public function doPingGeotrackee() // do “ping-geotrackee” command
}
|
FUTURE IMPROVEMENTS – FROM THE NINJA Not sure if there is much more to add to this script. I may want to add some geotrackee viewing restrictions so that you can differentiate between geotrackee’s that can see everyone’s location, with geotrackees that can only see their own and also hiding owner’s location. |
SYSTEM REQUIREMENTS
VERSION HISTORY – Twilio “Geo-text” Plug-In
My Other Scripts at Codecanyon:
- (BRAND NEW!!!) PHP Dashboard v5 (Enterprise Edition)
- PHP Daytrader’s Candlestick Pattern Hunter v1.0
- Twilio “Geo-text” Plug-In (a PHP Uber-style Geotracker Add On)
- PHP Uber-style GeoTracker
- PHP Dashboard v4.0 Collaborative Social Dashboards
- PHP Dashboard v3.0 – For Mobile Devices
- PHP Dashboard v2.7 – Responsive Carousels
- PHP Dashboard – NEW Version 1.2
- HTML5 Data-Driven Documents (D3js) Plug-In
- HTML5 Cloud Dashboard Designer
- HTML5 Streetmaps
- PHP Streetmaps
OTHER LINKS