Featured Products
- Home
- PHP Scripts
- Twilio "Geo-text" Plug-In (a PHP Uber-style Geotracker Add On)
Twilio "Geo-text" Plug-In (a PHP Uber-style Geotracker Add On)
By : data_ninja Published on Thursday, October 12, 2017,18:55:01 in PHP Scripts

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 in my demo environment here. Just text commands (below) to 415-360-0886 â FREE! To get started, see âHow-Toâ guide here or cllick on âLive Demoâ link above.!
        Â
WHAT DOES THIS TWILIO âGEO-TEXTâ PLUG-IN DO?
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.
- Install script/plug-in. For demo, text to 415-360-0886.
- Simply âtextâ a space or comma separated list of geotrackee email addresses or smart phone numbers to invite to a private geomap. The script will text you an invitation link (it automatically includes map owner as a geotrackee in every map. It will also text you confirmation which geotrackees were invited and which ones didnât (didnât pass validation).
- To add more geotrackees, continue to text emaill address and phone numbers to the plug-in phone number in step 1.
OTHER DISPATCHER FEATURES
Here is the list of all the dispatcher features built into this script that can be executed by texting commands to your Twilio phone number on your smartphone. Click here for screenshots of functionality below.
HOW DO I INSTALL THIS PLUG-IN?
- If you have not done so, purchase the âPHP Uber-style Geotrackerâ script from codecanyon.net
- If you have not done so, install the script (see âInstallation Instructionsâ section in the scriptâs documentation)
- Purchase this plug-in- Twilio âGeo-Textâ Plug-In
- Unzip the contents of the zip file into the following folder in your installation from step 1 and 2 (https://<domain root>/php/sms/)
- Go to Twilio.com and sign up for your account (sign up for the SMS product â make sure you purchase a twilio phone number for your users to text to)
- Click on âDashboardâ link to display Console Dashboard.
- Click on âProgrammable SMSâ link under the All Twilio Products section on Console Dashboard.
- Click on âMessaging Servicesâ link on the Programmable SMS Dashbaord page
- Click on â+â sign on the Messaging Services page
- Enter âgeotrackerâ as the friendly name and âNotifications, 2-Wayâ as the use case
- Check the âProcess Inbound Messagesâ check box and enter https://<your domain>/php/sms/receive.php and save Configure page

LIST OF TEXT COMMANDS
See table below for list of commands. Examples below are âtextâ commands that are sent to the Twilio phone number you set up during installation (or use the demo phone number: 415-360-0886).
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@dataninja.biz 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
}
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. I do plan to create a dispatcher module that uses a regular desktop user interface for serious dispatching. But not sure of the timing of this. It will probably leverage my other scripts including PHP Dashboards, etc. Let me know what you think by commenting on this script.
-Data Ninja
AUTHORâS NOTE IN BLOG: see blog post â Authorâs Note: Twilio âGeo-textâ Plug-In
DOCUMENTATION: see blog post â Authorâs Note: Twilio âGeo-Textâ Plug-In
REMINDER ON EXTENDED LICENSES: Just a friendly reminder that there are two different license levels at codecanyon.net. The regular license is for single FREE user use. If you have multiple clients or charging clients for functionality from this script, then an extended license is the appropriate level. Itâs only fair as I do spend a lot of time tuning these scripts. And more sales/revenues means I can code more features and it has come to my attention that many purchasers are using my script for commercial (for pay) purposes with just the regular license. Thanks for you support. Click for more details â Regular vs. Extended License Comparison
SYSTEM REQUIREMENTS
VERSION HISTORY â Twilio âGeo-textâ Plug-In
- Twilio SMS texting user interface for the PHP Uber-style Geotracker script.
- Dispatcher features not found in the original geotracker script. See ââList of Text Commandsâ section on this page for the list of features included in this initial version.
- (BRAND NEW!!!) PHP Daytraderâs Candlestick Pattern Hunter
- PHP Uber-style GeoTracker
- PHP Dashboard v4.0 Collaborative Social Dashboards
- PHP Dashboard v2.7 â Responsive Carousels/D3js/Highcharts/Highmaps/MySQL
- PHP Dashboard v3.0 â For Mobile Devices
- HTML5 Cloud Dashboard Designer
- HTML5 Streetmaps
- PHP Streetmaps