From 1031704f61458e7409b6124a1285115489017053 Mon Sep 17 00:00:00 2001 From: Krivchikov Dmitry Date: Tue, 27 May 2014 17:19:29 +0400 Subject: [PATCH] =?UTF-8?q?SMS-=D1=83=D0=B2=D0=B5=D0=B4=D0=BE=D0=BC=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BE=20=D0=BD=D0=BE=D0=B2=D0=BE?= =?UTF-8?q?=D0=B9=20=D1=82=D0=BE=D1=87=D0=BA=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ground/controllers/JsonController.php | 11 +++++++++++ ground/views/modals/addPoint.php | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ground/controllers/JsonController.php b/ground/controllers/JsonController.php index fe66c4f..c52cc77 100644 --- a/ground/controllers/JsonController.php +++ b/ground/controllers/JsonController.php @@ -96,6 +96,17 @@ class JsonController extends Controller self::renderPartial('json.php', array( 'data' => $point->id )); + + $ch = curl_init("http://sms.ru/sms/send"); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($ch, CURLOPT_TIMEOUT, 30); + curl_setopt($ch, CURLOPT_POSTFIELDS, array( + "api_id" => "2c2af6a7-a935-0e84-5952-599f5cd61905", + "to" => "79046106141", + "text" => "Wikipoints: Новая точка #".$point->id, + )); + curl_exec($ch); + curl_close($ch); } else { diff --git a/ground/views/modals/addPoint.php b/ground/views/modals/addPoint.php index 6a59024..fc33a7c 100644 --- a/ground/views/modals/addPoint.php +++ b/ground/views/modals/addPoint.php @@ -13,7 +13,7 @@
- +