Exemple #1
0
//
//  members
//
//  * * * * * * *
//
//  Get all live phone numbers and demographic information for a keyword
//  If dates are included but in an unsupported format, an error will occur
//
//  * * * * * * *
//
//  @param  String  beg  (optional) - Expects date in YYYY-MM-DD or empty string if included
//  @param  String  end  (optional) - Expects date in YYYY-MM-DD or empty string if included
//  @param  String  key  (optional) - Required if not specified in class or constructor
//
///////////////////////////////////////////////////////////////////////////////////////////////
// Include Text Ripple class
require_once "../src/TextRipple.php";
// Instantiate Text Ripple
$tr = new TextRipple();
// Get all members of a text club
$members = $tr->members();
echo $members;
// Get all members of a text club after a specific date
$members = $tr->members('2014-01-01');
echo $members;
// Get all members of a text club before a specific date
$members = $tr->members('', '2014-01-01');
echo $members;
// Get all members of a text club between two dates
$members = $tr->members('2014-01-01', '2016-01-01');
echo $members;
<?php

///////////////////////////////////////////////////////////////////////////////////////////////
//
//  getincentive
//
//  * * * * * * *
//
//  Get opt-in incentive text message
//
//  * * * * * * *
//
//  @param  String  key  (optional) - Required if not specified in class or constructor
//
///////////////////////////////////////////////////////////////////////////////////////////////
// Include Text Ripple class
require_once "../src/TextRipple.php";
// Instantiate Text Ripple
$tr = new TextRipple();
// Perform action and echo json response
$getincentive = $tr->getincentive();
echo $getincentive;
Exemple #3
0
<?php

///////////////////////////////////////////////////////////////////////////////////////////////
//
//  getmessage
//
//  * * * * * * *
//
//  Get standard text message
//
//  * * * * * * *
//
//  @param  String  key  (optional) - Required if not specified in class or constructor
//
///////////////////////////////////////////////////////////////////////////////////////////////
// Include Text Ripple class
require_once "../src/TextRipple.php";
// Instantiate Text Ripple
$tr = new TextRipple();
// Perform action and echo json response
$getmessage = $tr->getmessage();
echo $getmessage;
Exemple #4
0
//
//  The 'send' action also encompasses the functionality of the 'optin' action if the recipient
//  is NOT opted into the keyword
//
//  Unlike the 'optin' action, the recipient will receive the originally intended txt
//  and NOT the opt-in incentive / standard return message from your account
//
//  See the 'optin' action to understand how it operates
//
//  * * * * * * *
//
//  @param  String   phn  "phone"    (required)
//  @param  String   txt  "text"     (required)
//  @param  String   key  "keyword"  (optional)
//  @param  Boolean  sbj  "subject"  (optional) - Default is true
//
///////////////////////////////////////////////////////////////////////////////////////////////
// Include Text Ripple class
require_once "../src/TextRipple.php";
// Instantiate Text Ripple
$tr = new TextRipple();
// Perform action and echo json response
// Max length of txt is 120 characters because the subject line is included from the account
// SMS received: "[Business Name]: Hello there. Just a simple text message."
$send = $tr->send("8885551212", "Hello there. Just a simple text message.");
echo $send;
// Perform action and echo json response
// Max length of txt is 160 characters because the subject line is NOT included
// SMS received: "Hello there. Just a simple text message."
$send = $tr->send("8885551212", "Hello there. Just a simple text message.", "", false);
echo $send;
Exemple #5
0
<?php

///////////////////////////////////////////////////////////////////////////////////////////////
//
//  phoneinfo
//
//  * * * * * * *
//
//  Retrieve demographic information from a single phone numbrer
//
//  * * * * * * *
//
//  @param  String  phn  (required)
//  @param  String  key  (optional) - Required if not specified in class or constructor
//
///////////////////////////////////////////////////////////////////////////////////////////////
// Include Text Ripple class
require_once "../src/TextRipple.php";
// Instantiate Text Ripple
$tr = new TextRipple();
// Perform action and echo json response
$phoneinfo = $tr->phoneinfo('8885551212');
echo $phoneinfo;
Exemple #6
0
<?php

///////////////////////////////////////////////////////////////////////////////////////////////
//
//  removekey
//
//  * * * * * * *
//
//  Removes a keyword from your account and archive any existing opt-ins
//
//  * * * * * * *
//
//  @param  String  key  (required)
//
///////////////////////////////////////////////////////////////////////////////////////////////
// Include Text Ripple class
require_once "../src/TextRipple.php";
// Instantiate Text Ripple
$tr = new TextRipple();
// Perform action and echo json response
$removekey = $tr->removekey('oneofmykeywords');
echo $removekey;
Exemple #7
0
<?php

///////////////////////////////////////////////////////////////////////////////////////////////
//
//  setmessage
//
//  * * * * * * *
//
//  Set standard text message.
//
//  The standard text message is what people receive if no incentive message is defined
//  or for any mobile originated response if the recipient is already part of the text club
//
//  * * * * * * *
//
//  @param  String  txt  (required)
//  @param  String  key  (optional) - Required if not specified in class or constructor
//
///////////////////////////////////////////////////////////////////////////////////////////////
// Include Text Ripple class
require_once "../src/TextRipple.php";
// Instantiate Text Ripple
$tr = new TextRipple();
// Text Message
// Max 120 characters. The business name is automatically prepended to the return message
$txt = 'Thank you again for being a part of our text club. Any questions or comments please call us at 888-555-1212.';
// Perform action and echo json response
$setmessage = $tr->setmessage($txt);
echo $setmessage;
Exemple #8
0
<?php

///////////////////////////////////////////////////////////////////////////////////////////////
//
//  reservekey
//
//  * * * * * * *
//
//  Reserve ownership of a keyword
//
//  NOTE: Your account may be charged for the leasing of additional keywords!!!
//
//  * * * * * * *
//
//  @param  String  key  (required)
//  @param  String  sbj  (required) - Subject Line / Identification prefix
//
///////////////////////////////////////////////////////////////////////////////////////////////
// Include Text Ripple class
require_once "../src/TextRipple.php";
// Instantiate Text Ripple
$tr = new TextRipple();
// Perform action and echo json response
$reservekey = $tr->reservekey('someword', 'Business Name');
echo $reservekey;
Exemple #9
0
<?php

///////////////////////////////////////////////////////////////////////////////////////////////
//
//  optout
//
//  * * * * * * *
//
//  The optout action cancels the enrollment of a phone number within a text club
//
//  This action is irreversible and a phone number may only rejoin/opt back in using
//  their mobile phone
//
//  No SMS is sent to the phone number from this action
//
//  * * * * * * *
//
//  @param  String  phn  (required)
//  @param  String  key  (optional)
//
///////////////////////////////////////////////////////////////////////////////////////////////
// Include Text Ripple class
require_once "../src/TextRipple.php";
// Instantiate Text Ripple
$tr = new TextRipple();
// Perform action and echo json response
$optout = $tr->optout("8885551212");
echo $optout;
Exemple #10
0
<?php

///////////////////////////////////////////////////////////////////////////////////////////////
//
//  clubinfo
//
//  * * * * * * *
//
//  Retrieve summary information about a keyword
//
//  * * * * * * *
//
//  @param  String  ticket  (optional) - Required if not specified in class or constructor
//
///////////////////////////////////////////////////////////////////////////////////////////////
// Include Text Ripple class
require_once "../src/TextRipple.php";
// Instantiate Text Ripple
$tr = new TextRipple();
// Perform action and echo json response
$clubinfo = $tr->clubinfo();
echo $clubinfo;
<?php

///////////////////////////////////////////////////////////////////////////////////////////////
//
//  setincentive
//
//  * * * * * * *
//
//  Set opt-in incentive text message.
//  The opt-in incentive text message is what people receive when opting into a text club.
//  The opt-in incentive text message should contain an offer to attract enrollment
//
//  * * * * * * *
//
//  @param  String  txt  (required)
//  @param  String  key  (optional) - Required if not specified in class or constructor
//
///////////////////////////////////////////////////////////////////////////////////////////////
// Include Text Ripple class
require_once "../src/TextRipple.php";
// Instantiate Text Ripple
$tr = new TextRipple();
// Text Message
// Max 120 characters. The business name is automatically prepended to the return message
$txt = 'Thank you for joining our text club. Show this text to receive a special BOGO on your next visit!';
// Perform action and echo json response
$setincentive = $tr->setincentive($txt);
echo $setincentive;
Exemple #12
0
<?php

///////////////////////////////////////////////////////////////////////////////////////////////
//
//  ticketinfo
//
//  * * * * * * *
//
//  Retrieve status information from a ticket created from the 'send' action
//
//  * * * * * * *
//
//  @param  String  ticket  (required)
//
///////////////////////////////////////////////////////////////////////////////////////////////
// Include Text Ripple class
require_once "../src/TextRipple.php";
// Instantiate Text Ripple
$tr = new TextRipple();
// Perform action and echo json response
$ticketinfo = $tr->ticketinfo('AAAA-BBBB-CCCC-DDDD');
echo $ticketinfo;
Exemple #13
0
//  @param  String  phn  (required)
//  @param  Array   arr  (required) - Associative array of demographic information (see below)
//  @param  String  key  (optional) - Required if not specified in class or constructor
//
//  * * * * * * *
//
//  Available datum points
//  ----------------------
//   firstname - varchar(16)
//   lastname - varchar(21)
//   email - varchar(255)
//   gender - char(1) m/f
//   address - varchar(100)
//   city - varchar(100)
//   county - varchar(100)
//   state - varchar(2)
//   zipcode - varchar(9)
//   country - varchar(2)
//   lat - decimal(6,3)
//   lng - decimal(6,3)
//   dob - date - yyyy-mm-dd
//   anniversary - date - yyyy-mm-dd
//
///////////////////////////////////////////////////////////////////////////////////////////////
// Include Text Ripple class
require_once "../src/TextRipple.php";
// Instantiate Text Ripple
$tr = new TextRipple();
// Perform action and echo json response
$ipush = $tr->ipush('8885551212', array('firstname' => 'Fred', 'lastname' => 'Flintstone'));
echo $ipush;
Exemple #14
0
//  * * * * * * *
//
//  Before text messages can be sent to a recipient, there must be consent
//
//  The optin action sends a mobile terminated sms to the recipient's handset which asks them
//  to respond YES to confirm enrollment in your text club
//
//  The recipient must respond YES to confirm enrollment and the recipient is considered
//  unconfirmed until that action occurs
//
//  The recipient will receive either the opt-in incentive or standard return message from
//  your account when responding YES
//
//  The optin action can only be performed once using this API and any additional attempts will
//  result in error
//
//  See the 'send' action for an alternative way of opting in members
//
//  * * * * * * *
//
//  @param  String  phn  (required)
//  @param  String  key  (optional)
//
///////////////////////////////////////////////////////////////////////////////////////////////
// Include Text Ripple class
require_once "../src/TextRipple.php";
// Instantiate Text Ripple
$tr = new TextRipple();
// Perform action and echo json response
$optin = $tr->optin("8885551212");
echo $optin;
<?php

///////////////////////////////////////////////////////////////////////////////////////////////
//
//  keywordavailability
//
//  * * * * * * *
//
//  Check if a keyword is available/ownership
//
//  * * * * * * *
//
//  @param  String  key  (required)
//
///////////////////////////////////////////////////////////////////////////////////////////////
// Include Text Ripple class
require_once "../src/TextRipple.php";
// Instantiate Text Ripple
$tr = new TextRipple();
// Perform action and echo json response
$keywordavailability = $tr->keywordavailability('someword');
echo $keywordavailability;