Twilio “Geo-text” Plug-In (a PHP Uber-style Geotracker Add On)

wordpress themes

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.

  1. Install script/plug-in. For demo, text to 415-360-0886.
  2. 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).
  3. 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.

  • LIST ALL YOUR MAPS – Text “list-maps” or “lm” to the twilio number to get a numbered list of maps you own.
  • ADD A NEW MAP – Text “new-map” or “nm” to the twilio number
  • SWITCH ACTIVE MAP – Text “switch-map” or “sm” and then the map number (from “list-maps” list) to the twilio number (e.g. “sm 3”)
  • RENAME MAP – Give your map a friendlier name. Text “rename-map” or “rm”, followed by the map number and then the friendly name you want to give the map. (e.g. “rm 2 My Test Map”)
  • DELETING A MAP – Text “delete-map” or “dm” and then the map number you want to delete followed by the map number you want to delete.
  • ADDING A GEOTRACKEE – Text “add-geotrackee” or “ag” and then a comma or space separated list of geotrackee emails and phone numbers. This is optional, you can just text new emails and phone numbers. (e.g. “ag [email protected] [email protected] 4153333333”)
  • LIST ALL GEOTRACKEES OF ACTIVE MAP – Text “list-geotrackees” or “lg” to get a numbered list of geotrackees in the active map. (e.g. “ag [email protected] [email protected] 4153333333”)
  • DELETING A GEOTRACKEE – Text “delete-geotrackee” or “dg” and the geotrackee’s number from “list-geotrackee” list. (e.g. “dg 2”)
  • RENAME A GEOTRACKEE – Text “rename-geotrackee” or “rg”, the geotrackee’s number from “list-geotrackee” list and the geotrackee’s nickname. (e.g. “rg 2 Lucky Louie”)
  • PING ALL THE GEOTRACKEES IN THE ACTIVE MAP – Text “ping-geotrackee” or “pg”, then the word “all”. (e.g. “pg all”)
  • PING AN INDIVIDUAL GEOTRACKEE IN THE ACTIVE MAP – Text “ping-geotrackee” or “pg”, then the geotrackee’s number you want to ping. (e.g. “pg 3”)
  • GETTING HELP – Text “help-me” or ”?” to clear all the maps and geotrackees and reset.
  • RESETTING – Text “clear-all” or “ca” to clear all the maps and geotrackees and reset.

HOW DO I INSTALL THIS PLUG-IN?

  1. If you have not done so, purchase the “PHP Uber-style Geotracker” script from codecanyon.net
  2. If you have not done so, install the script (see ‘Installation Instructions’ section in the script’s documentation)
  3. Purchase this plug-in- Twilio “Geo-Text” Plug-In
  4. Unzip the contents of the zip file into the following folder in your installation from step 1 and 2 (http://<domain root>/php/sms/)
  5. 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)
  6. Click on ‘Dashboard’ link to display Console Dashboard.
  7. Click on ‘Programmable SMS’ link under the All Twilio Products section on Console Dashboard.
  8. Click on ‘Messaging Services’ link on the Programmable SMS Dashbaord page
  9. Click on ’+’ sign on the Messaging Services page
  10. Enter ‘geotracker’ as the friendly name and ‘Notifications, 2-Way’ as the use case
  11. 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 [email protected] 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.

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

  • Any browser that supports HTML5/Javascript, jQuery (2.1.4). Tested with Chrome Version 49.0.2623.110 (64-bit), Safari Version 5.1.7 (7534.57.2), Internet Explorer 11.0.9600.18230, Firefox 5.0.2
  • A PHP/MySQL supported webserver is required for jsfiddle features (preview, share, save) and render script options #3 and #4 – click here for phpinfo for PHP/MySQL versions and configuration options of the server serving up the demo. IMPORTANT: make sure to compare with phpinfo of your installation. Many PHP/MySQL errors stem from configuration options of customer php server instances.
  • You will need a PAID Twilio account and phone number
  • (See installation instructions on this page to see how to sign up and install)

VERSION HISTORY – Twilio “Geo-text” Plug-In

  • VERSION 1.0 (10/02/2017) – Initial launch version
  1. Twilio SMS texting user interface for the PHP Uber-style Geotracker script.
  2. 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.

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


Download NOW

AliDropship is the best solution for drop shipping

Be the first to comment

Leave a Reply

Your email address will not be published.


*


Privacy Policy

BootstrapDeive.com is committed to safeguarding your privacy. Contact us at if you have any questions or problems regarding the use of your Personal Data and we will gladly assist you.

By using this site or/and our services, you consent to the Processing of your Personal Data as described in this Privacy Policy.

Table of Contents

  1. Definitions used in this Policy
  2. Data protection principles we follow
  3. What rights do you have regarding your Personal Data
  4. What Personal Data we gather about you
  5. How we use your Personal Data
  6. Who else has access to your Personal Data
  7. How we secure your data
  8. Information about cookies
  9. Contact information

Definitions

Personal Data – any information relating to an identified or identifiable natural person.
Processing – any operation or set of operations which is performed on Personal Data or on sets of Personal Data.
Data subject – a natural person whose Personal Data is being Processed.
Child – a natural person under 16 years of age.
We/us (either capitalized or not)

Data Protection Principles

We promise to follow the following data protection principles:

  • Processing is lawful, fair, transparent. Our Processing activities have lawful grounds. We always consider your rights before Processing Personal Data. We will provide you information regarding Processing upon request.
  • Processing is limited to the purpose. Our Processing activities fit the purpose for which Personal Data was gathered.
  • Processing is done with minimal data. We only gather and Process the minimal amount of Personal Data required for any purpose.
  • Processing is limited with a time period. We will not store your personal data for longer than needed.
  • We will do our best to ensure the accuracy of data.
  • We will do our best to ensure the integrity and confidentiality of data.

Data Subject’s rights

The Data Subject has the following rights:

  1. Right to information – meaning you have to right to know whether your Personal Data is being processed; what data is gathered, from where it is obtained and why and by whom it is processed.
  2. Right to access – meaning you have the right to access the data collected from/about you. This includes your right to request and obtain a copy of your Personal Data gathered.
  3. Right to rectification – meaning you have the right to request rectification or erasure of your Personal Data that is inaccurate or incomplete.
  4. Right to erasure – meaning in certain circumstances you can request for your Personal Data to be erased from our records.
  5. Right to restrict processing – meaning where certain conditions apply, you have the right to restrict the Processing of your Personal Data.
  6. Right to object to processing – meaning in certain cases you have the right to object to Processing of your Personal Data, for example in the case of direct marketing.
  7. Right to object to automated Processing – meaning you have the right to object to automated Processing, including profiling; and not to be subject to a decision based solely on automated Processing. This right you can exercise whenever there is an outcome of the profiling that produces legal effects concerning or significantly affecting you.
  8. Right to data portability – you have the right to obtain your Personal Data in a machine-readable format or if it is feasible, as a direct transfer from one Processor to another.
  9. Right to lodge a complaint – in the event that we refuse your request under the Rights of Access, we will provide you with a reason as to why. If you are not satisfied with the way your request has been handled please contact us.
  10. Right for the help of supervisory authority – meaning you have the right for the help of a supervisory authority and the right for other legal remedies such as claiming damages.
  11. Right to withdraw consent – you have the right withdraw any given consent for Processing of your Personal Data.

Data we gather

Information you have provided us with
This might be your e-mail address, name, billing address, home address etc – mainly information that is necessary for delivering you a product/service or to enhance your customer experience with us. We save the information you provide us with in order for you to comment or perform other activities on the website. This information includes, for example, your name and e-mail address.

Information automatically collected about you
This includes information that is automatically stored by cookies and other session tools. For example, your shopping cart information, your IP address, your shopping history (if there is any) etc. This information is used to improve your customer experience. When you use our services or look at the contents of our website, your activities may be logged.

Information from our partners
We gather information from our trusted partners with confirmation that they have legal grounds to share that information with us. This is either information you have provided them directly with or that they have gathered about you on other legal grounds. See the list of our partners here.

Publicly available information
We might gather information about you that is publicly available.

How we use your Personal Data

We use your Personal Data in order to:

  • provide our service to you. This includes for example registering your account; providing you with other products and services that you have requested; providing you with promotional items at your request and communicating with you in relation to those products and services; communicating and interacting with you; and notifying you of changes to any services.
  • enhance your customer experience;
  • fulfil an obligation under law or contract;

We use your Personal Data on legitimate grounds and/or with your Consent.

On the grounds of entering into a contract or fulfilling contractual obligations, we Process your Personal Data for the following purposes:

  • to identify you;
  • to provide you a service or to send/offer you a product;
  • to communicate either for sales or invoicing;

On the ground of legitimate interest, we Process your Personal Data for the following purposes:

  • to send you personalized offers* (from us and/or our carefully selected partners);
  • to administer and analyse our client base (purchasing behaviour and history) in order to improve the quality, variety, and availability of products/ services offered/provided;
  • to conduct questionnaires concerning client satisfaction;

As long as you have not informed us otherwise, we consider offering you products/services that are similar or same to your purchasing history/browsing behaviour to be our legitimate interest.

With your consent we Process your Personal Data for the following purposes:

  • to send you newsletters and campaign offers (from us and/or our carefully selected partners);
  • for other purposes we have asked your consent for;

We Process your Personal Data in order to fulfil obligation rising from law and/or use your Personal Data for options provided by law. We reserve the right to anonymise Personal Data gathered and to use any such data. We will use data outside the scope of this Policy only when it is anonymised. We save your billing information and other information gathered about you for as long as needed for accounting purposes or other obligations deriving from law, but not longer than 1 year.

We might process your Personal Data for additional purposes that are not mentioned here, but are compatible with the original purpose for which the data was gathered. To do this, we will ensure that:

  • the link between purposes, context and nature of Personal Data is suitable for further Processing;
  • the further Processing would not harm your interests and
  • there would be appropriate safeguard for Processing.

We will inform you of any further Processing and purposes.

Who else can access your Personal Data

We do not share your Personal Data with strangers. Personal Data about you is in some cases provided to our trusted partners in order to either make providing the service to you possible or to enhance your customer experience. We share your data with:

Our processing partners:

  • facebook.com
  • google.com
  • bing.com
  • twitter.com
  • pinterest.com

Our business partners:

  • facebook.com
  • google.com
  • bing.com
  • twitter.com
  • pinterest.com

Connected third parties:

  • facebook.com
  • google.com
  • bing.com
  • twitter.com
  • pinterest.com

We only work with Processing partners who are able to ensure adequate level of protection to your Personal Data. We disclose your Personal Data to third parties or public officials when we are legally obliged to do so. We might disclose your Personal Data to third parties if you have consented to it or if there are other legal grounds for it.

How we secure your data

We do our best to keep your Personal Data safe. We use safe protocols for communication and transferring data (such as HTTPS). We use anonymising and pseudonymising where suitable. We monitor our systems for possible vulnerabilities and attacks.

Even though we try our best we can not guarantee the security of information. However, we promise to notify suitable authorities of data breaches. We will also notify you if there is a threat to your rights or interests. We will do everything we reasonably can to prevent security breaches and to assist authorities should any breaches occur.

If you have an account with us, note that you have to keep your username and password secret.

Children

We do not intend to collect or knowingly collect information from children. We do not target children with our services.

Cookies and other technologies we use

We use cookies and/or similar technologies to analyse customer behaviour, administer the website, track users’ movements, and to collect information about users. This is done in order to personalise and enhance your experience with us.

A cookie is a tiny text file stored on your computer. Cookies store information that is used to help make sites work. Only we can access the cookies created by our website. You can control your cookies at the browser level. Choosing to disable cookies may hinder your use of certain functions.

We use cookies for the following purposes:

  • Necessary cookies – these cookies are required for you to be able to use some important features on our website, such as logging in. These cookies don’t collect any personal information.
  • Functionality cookies – these cookies provide functionality that makes using our service more convenient and makes providing more personalised features possible. For example, they might remember your name and e-mail in comment forms so you don’t have to re-enter this information next time when commenting.
  • Analytics cookies – these cookies are used to track the use and performance of our website and services
  • Advertising cookies – these cookies are used to deliver advertisements that are relevant to you and to your interests. In addition, they are used to limit the number of times you see an advertisement. They are usually placed to the website by advertising networks with the website operator’s permission. These cookies remember that you have visited a website and this information is shared with other organisations such as advertisers. Often targeting or advertising cookies will be linked to site functionality provided by the other organisation.

You can remove cookies stored in your computer via your browser settings. Alternatively, you can control some 3rd party cookies by using a privacy enhancement platform such as optout.aboutads.info or youronlinechoices.com. For more information about cookies, visit allaboutcookies.org.

We use Google Analytics to measure traffic on our website. Google has their own Privacy Policy which you can review here. If you’d like to opt out of tracking by Google Analytics, visit the Google Analytics opt-out page.

Read more about cookies on our Cookie Policy

Contact Information

email: [email protected]

Changes to this Privacy Policy

We reserve the right to make change to this Privacy Policy.

You can configure your Internet browser, by changing its options, to stop accepting cookies completely or to prompt you before accepting a cookie from the website you visit. If you do not accept cookies, however, you may not be able to use all portions of the BootstrapDeive.com Websites or all functionality of the Services.

Please note that disabling these technologies may interfere with the performance and features of the Services.

You may also disable cookies on the BootstrapDeive.com Sites by modifying your settings here:

Visitor comments may be checked through an automated spam detection service.

Last Update: May 25, 2018