From abe76c7337ad1aff788f28cb2feb68a56a82ee74 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Mon, 10 Sep 2012 15:26:52 +0200 Subject: [PATCH] updated aws.php --- sms_contact/aws.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/sms_contact/aws.php b/sms_contact/aws.php index 441d518..6e77544 100644 --- a/sms_contact/aws.php +++ b/sms_contact/aws.php @@ -9,10 +9,6 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { $body = file_get_contents('php://input'); $json = json_decode($body, true); - file_put_contents('aws.log', print_r($headers, true) . "\r\n", FILE_APPEND); - file_put_contents('aws.log', print_r($body, true) . "\r\n", FILE_APPEND); - file_put_contents('aws.log', print_r($json, true) . "\r\n", FILE_APPEND); - switch ($headers['x-amz-sns-message-type']) { case 'SubscriptionConfirmation': fopen($json['SubscribeURL'], 'r'); @@ -25,10 +21,10 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { if ($balance < $config['reserve']) { header("HTTP/1.0 402 Payment Required"); - die(); } - - $sipgate->sendSMS($config['recipient'], $message, NULL, $config['recipient']); + else { + $sipgate->sendSMS($config['recipient'], $message, NULL, $config['recipient']); + } break; default: