Permalink
Browse files

v1

  • Loading branch information...
1 parent eb3c4c1 commit c1090097dda4e0dcfbe363eabd58b0d2baefe114 @warnew committed Apr 10, 2012
Showing with 7 additions and 6 deletions.
  1. +3 −2 sms_notify_autoresponder.php
  2. +4 −4 sms_notify_config.php
View
5 sms_notify_autoresponder.php
@@ -10,6 +10,7 @@ function send_texts($numbers,$text) {
$client = new SoapClient('http://sms2.cdyne.com/sms.svc?wsdl');
// Cycle trough the numbers
+ if (!is_array($numbers)) $numbers = array($numbers);
foreach ($numbers as $num) {
// Specify the text
$param = array(
@@ -20,8 +21,8 @@ function send_texts($numbers,$text) {
// Send the text
$result[] = $client->SimpleSMSsend($param);
}
- // View the response from CDYNE while debugging
- if ($_GET['debug'] == 1) print_r($result);
+ // uncomment for debugging (and seeing CDYNE's response)
+ //print_r($result);
}
function generate_text($sms) {
View
8 sms_notify_config.php
@@ -4,13 +4,13 @@
//Get your own!
$cdyne_lkey = 'FB11611C-B6EB-48BE-96B2-6990ECD87DD1';
+$sms_notify_url = $_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF']).'/sms_notify_autoresponder.php';
+
// the events are in this array
// 'event_name' => 'response_text'
-$sms_notify_url = $_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF']).'/sms_notify_autoresponder.php';
-
-$sms_notifier_events['new_mention'] = 'Hey, somebody just mentioned you at oru forums!';
-$sms_notifier_events['long_time_no_see'] = 'Long time no see! You should check in to our forums!';
+$sms_notifier_events = array('new_mention' => 'Hey, somebody just mentioned you at our forums!',
+ 'long_time_no_see'] => 'Long time no see! You should check in to our forums!';
?>

0 comments on commit c109009

Please sign in to comment.