mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-03 09:14:48 +09:00
Move all composer files inside the common directory
- 2022년 3월 개발팀 결정사항 적용 - 모듈 등 서드파티 자료 개발시 composer를 사용하면 상위 경로에 있는 코어의 composer.json을 수정하고, 코어의 vendor 디렉토리를 건드리는 것이 기본값임 - 이를 방지하기 위해 코어의 composer.json과 vendor를 common 디렉토리 안으로 이동하여, 모듈 경로에서 상위 폴더로 인식하지 않도록 함
This commit is contained in:
parent
7b912d21fc
commit
5fff6b6eab
1478 changed files with 2 additions and 2 deletions
46
common/vendor/coolsms/php-sdk/examples/GroupMessage/example_add_messages.php
vendored
Normal file
46
common/vendor/coolsms/php-sdk/examples/GroupMessage/example_add_messages.php
vendored
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
<?php
|
||||
/**
|
||||
* #example_add_messages
|
||||
*
|
||||
* This sample code demonstrate how to add messages into group through CoolSMS Rest API PHP
|
||||
* for more info, visit
|
||||
* www.coolsms.co.kr
|
||||
*/
|
||||
|
||||
use Nurigo\Api\GroupMessage;
|
||||
use Nurigo\Exceptions\CoolsmsException;
|
||||
|
||||
require_once __DIR__ . "/../../bootstrap.php";
|
||||
|
||||
// api_key and api_secret can be obtained from www.coolsms.co.kr/credentials
|
||||
$api_key = '#ENTER_YOUR_OWN#';
|
||||
$api_secret = '#ENTER_YOUR_OWN#';
|
||||
|
||||
try {
|
||||
// initiate rest api sdk object
|
||||
$rest = new GroupMessage($api_key, $api_secret);
|
||||
|
||||
// options(to, from, text) are mandatory. must be filled
|
||||
$options = new stdClass();
|
||||
$options->to = '01000000000'; // 수신번호
|
||||
$options->from = '01000000000'; // 발신번호
|
||||
$options->text = '안녕하세요. 10000건을 20초안에 발송하는 빠르고 저렴한 CoolSMS의 테스팅 문자입니다. '; // 문자내용
|
||||
$options->group_id = 'GID56CC00E21C4DC'; // group id
|
||||
|
||||
// Optional parameters for your own needs
|
||||
// $options->type = 'SMS'; // Message type ( SMS, LMS, MMS, ATA )
|
||||
// $options->image_id = 'IM289E9CISNWIC' // image_id. type must be set as 'MMS'
|
||||
// $options->refname = ''; // Reference name
|
||||
// $options->country = 82; // Korea(82) Japan(81) America(1) China(86) Default is Korea
|
||||
// $options->datetime = '20140106153000'; // Format must be(YYYYMMDDHHMISS) 2014 01 06 15 30 00 (2014 Jan 06th 3pm 30 00)
|
||||
// $options->subject = 'Hello World'; // set msg title for LMS and MMS
|
||||
// $options->delay = 10; // '0~20' delay messages
|
||||
// $options->sender_key = '55540253a3e61072...'; // 알림톡 사용을 위해 필요합니다. 신청방법 : http://www.coolsms.co.kr/AboutAlimTalk
|
||||
// $options->template_code = 'C004'; // 알림톡 template code 입니다. 자세한 설명은 http://www.coolsms.co.kr/AboutAlimTalk을 참조해주세요.
|
||||
|
||||
$result = $rest->addMessages($options);
|
||||
print_r($result);
|
||||
} catch(CoolsmsException $e) {
|
||||
echo $e->getMessage(); // get error message
|
||||
echo $e->getCode(); // get error code
|
||||
}
|
||||
58
common/vendor/coolsms/php-sdk/examples/GroupMessage/example_add_messages_json.php
vendored
Normal file
58
common/vendor/coolsms/php-sdk/examples/GroupMessage/example_add_messages_json.php
vendored
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
<?php
|
||||
/**
|
||||
* #example_add_messages
|
||||
*
|
||||
* This sample code demonstrate how to add json type messages into group through CoolSMS Rest API PHP
|
||||
* for more info, visit
|
||||
* www.coolsms.co.kr
|
||||
*/
|
||||
|
||||
use Nurigo\Api\GroupMessage;
|
||||
use Nurigo\Exceptions\CoolsmsException;
|
||||
|
||||
require_once __DIR__ . "/../../bootstrap.php";
|
||||
|
||||
// api_key and api_secret can be obtained from www.coolsms.co.kr/credentials
|
||||
$api_key = '#ENTER_YOUR_OWN#';
|
||||
$api_secret = '#ENTER_YOUR_OWN#';
|
||||
|
||||
try {
|
||||
// initiate rest api sdk object
|
||||
$rest = new GroupMessage($api_key, $api_secret);
|
||||
|
||||
// options(message, group_id) are mandatory. must be filled
|
||||
$options = new stdClass();
|
||||
|
||||
$text = array(
|
||||
0 => "안녕하세요.",
|
||||
1 => "10000건을 20초안에 발송하는 빠르고 저렴한",
|
||||
2 => "CoolSMS의 테스팅 문자입니다.");
|
||||
|
||||
$messages = array();
|
||||
foreach($text as $val) {
|
||||
$message = new stdClass();
|
||||
$message->type = "SMS";
|
||||
$message->to = "01000000000";
|
||||
$message->from = "01000000000";
|
||||
$message->text = $val;
|
||||
$messages[] = $message;
|
||||
|
||||
// Optional parameters for your own needs
|
||||
// $message->type = 'SMS'; // Message type ( SMS, LMS, MMS, ATA )
|
||||
// $message->image_id = 'IM289E9CISNWIC' // image_id. type must be set as 'MMS'
|
||||
// $message->refname = ''; // Reference name
|
||||
// $message->country = 82; // Korea(82) Japan(81) America(1) China(86) Default is Korea
|
||||
// $message->datetime = '20140106153000'; // Format must be(YYYYMMDDHHMISS) 2014 01 06 15 30 00 (2014 Jan 06th 3pm 30 00)
|
||||
// $message->subject = 'Hello World'; // set msg title for LMS and MMS
|
||||
// $message->delay = 10; // '0~20' delay messages
|
||||
// $message->sender_key = '55540253a3e61072...'; // 알림톡 사용을 위해 필요합니다. 신청방법 : http://www.coolsms.co.kr/AboutAlimTalk
|
||||
// $message->template_code = 'C004'; // 알림톡 template code 입니다. 자세한 설명은 http://www.coolsms.co.kr/AboutAlimTalk을 참조해주세요.
|
||||
}
|
||||
$options->messages = $messages;
|
||||
$options->group_id = 'GID57317013931B0'; // group id
|
||||
$result = $rest->addMessagesJSON($options);
|
||||
print_r($result);
|
||||
} catch(CoolsmsException $e) {
|
||||
echo $e->getMessage(); // get error message
|
||||
echo $e->getCode(); // get error code
|
||||
}
|
||||
37
common/vendor/coolsms/php-sdk/examples/GroupMessage/example_create_group.php
vendored
Normal file
37
common/vendor/coolsms/php-sdk/examples/GroupMessage/example_create_group.php
vendored
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
<?php
|
||||
/**
|
||||
* #example_new_group
|
||||
*
|
||||
* This sample code demonstrate how to create sms group through CoolSMS Rest API PHP
|
||||
* for more info, visit
|
||||
* www.coolsms.co.kr
|
||||
*/
|
||||
|
||||
use Nurigo\Api\GroupMessage;
|
||||
use Nurigo\Exceptions\CoolsmsException;
|
||||
|
||||
require_once __DIR__ . "/../../bootstrap.php";
|
||||
|
||||
// api_key and api_secret can be obtained from www.coolsms.co.kr/credentials
|
||||
$api_key = '#ENTER_YOUR_OWN#';
|
||||
$api_secret = '#ENTER_YOUR_OWN#';
|
||||
|
||||
try {
|
||||
// initiate rest api sdk object
|
||||
$rest = new GroupMessage($api_key, $api_secret);
|
||||
|
||||
// Optional parameters for your own needs
|
||||
$options = new stdClass();
|
||||
// $options->charset = 'utf8'; // utf8, euckr default value is utf8
|
||||
// $options->srk = ''; // Solution key
|
||||
// $options->mode = 'test'; // If 'test' value. refund cash to point
|
||||
// $options->delay = 10; // '0~20' delay messages
|
||||
// $options->force_sms = true; // 'true or false' always send sms
|
||||
// $options->app_version = ''; // App version
|
||||
|
||||
$result = $rest->createGroup($options);
|
||||
print_r($result);
|
||||
} catch(CoolsmsException $e) {
|
||||
echo $e->getMessage(); // get error message
|
||||
echo $e->getCode(); // get error code
|
||||
}
|
||||
31
common/vendor/coolsms/php-sdk/examples/GroupMessage/example_delete_groups.php
vendored
Normal file
31
common/vendor/coolsms/php-sdk/examples/GroupMessage/example_delete_groups.php
vendored
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
/**
|
||||
* #example_delete_group
|
||||
*
|
||||
* This sample code demonstrate how to delete sms group through CoolSMS Rest API PHP
|
||||
* for more info, visit
|
||||
* www.coolsms.co.kr
|
||||
*/
|
||||
|
||||
use Nurigo\Api\GroupMessage;
|
||||
use Nurigo\Exceptions\CoolsmsException;
|
||||
|
||||
require_once __DIR__ . "/../../bootstrap.php";
|
||||
|
||||
// api_key and api_secret can be obtained from www.coolsms.co.kr/credentials
|
||||
$api_key = '#ENTER_YOUR_OWN#';
|
||||
$api_secret = '#ENTER_YOUR_OWN#';
|
||||
|
||||
try {
|
||||
// initiate rest api sdk object
|
||||
$rest = new GroupMessage($api_key, $api_secret);
|
||||
|
||||
// group_ids are mandatory. must be filled
|
||||
$group_ids = 'GID56CC00E21C4DC'; // ex) '1GCOLS23BDG','RGGBB11545'
|
||||
|
||||
$result = $rest->deleteGroups($group_ids);
|
||||
print_r($result);
|
||||
} catch(CoolsmsException $e) {
|
||||
echo $e->getMessage(); // get error message
|
||||
echo $e->getCode(); // get error code
|
||||
}
|
||||
32
common/vendor/coolsms/php-sdk/examples/GroupMessage/example_delete_messages.php
vendored
Normal file
32
common/vendor/coolsms/php-sdk/examples/GroupMessage/example_delete_messages.php
vendored
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
/**
|
||||
* #example_delete_messages
|
||||
*
|
||||
* This sample code demonstrate how to delete messages through CoolSMS Rest API PHP
|
||||
* for more info, visit
|
||||
* www.coolsms.co.kr
|
||||
*/
|
||||
|
||||
use Nurigo\Api\GroupMessage;
|
||||
use Nurigo\Exceptions\CoolsmsException;
|
||||
|
||||
require_once __DIR__ . "/../../bootstrap.php";
|
||||
|
||||
// api_key and api_secret can be obtained from www.coolsms.co.kr/credentials
|
||||
$api_key = '#ENTER_YOUR_OWN#';
|
||||
$api_secret = '#ENTER_YOUR_OWN#';
|
||||
|
||||
try {
|
||||
// initiate rest api sdk object
|
||||
$rest = new GroupMessage($api_key, $api_secret);
|
||||
|
||||
// group_id, message_ids are mandatory. must be filled
|
||||
$group_id = 'GID56CC00E21C4DC'; // group id
|
||||
$message_ids = '2838DFJFE02EI10TM'; // message ids. ex) '2838DFJFE02EI10TM','RGGBB11545'
|
||||
|
||||
$result = $rest->deleteMessages($group_id, $message_ids);
|
||||
print_r($result);
|
||||
} catch(CoolsmsException $e) {
|
||||
echo $e->getMessage(); // get error message
|
||||
echo $e->getCode(); // get error code
|
||||
}
|
||||
31
common/vendor/coolsms/php-sdk/examples/GroupMessage/example_get_group_info.php
vendored
Normal file
31
common/vendor/coolsms/php-sdk/examples/GroupMessage/example_get_group_info.php
vendored
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
/**
|
||||
* #example_group_info
|
||||
*
|
||||
* This sample code demonstrate how to check group info through CoolSMS Rest API PHP
|
||||
* for more info, visit
|
||||
* www.coolsms.co.kr
|
||||
*/
|
||||
|
||||
use Nurigo\Api\GroupMessage;
|
||||
use Nurigo\Exceptions\CoolsmsException;
|
||||
|
||||
require_once __DIR__ . "/../../bootstrap.php";
|
||||
|
||||
// api_key and api_secret can be obtained from www.coolsms.co.kr/credentials
|
||||
$api_key = '#ENTER_YOUR_OWN#';
|
||||
$api_secret = '#ENTER_YOUR_OWN#';
|
||||
|
||||
try {
|
||||
// initiate rest api sdk object
|
||||
$rest = new GroupMessage($api_key, $api_secret);
|
||||
|
||||
// group_id are mandatory. must be filled
|
||||
$group_id = 'GIDFIWKEO19DIW29'; // group id
|
||||
|
||||
$result = $rest->getGroupInfo($group_id);
|
||||
print_r($result);
|
||||
} catch(CoolsmsException $e) {
|
||||
echo $e->getMessage(); // get error message
|
||||
echo $e->getCode(); // get error code
|
||||
}
|
||||
28
common/vendor/coolsms/php-sdk/examples/GroupMessage/example_get_group_list.php
vendored
Normal file
28
common/vendor/coolsms/php-sdk/examples/GroupMessage/example_get_group_list.php
vendored
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
/**
|
||||
* #example_group_list
|
||||
*
|
||||
* This sample code demonstrate how to check group list through CoolSMS Rest API PHP
|
||||
* for more info, visit
|
||||
* www.coolsms.co.kr
|
||||
*/
|
||||
|
||||
use Nurigo\Api\GroupMessage;
|
||||
use Nurigo\Exceptions\CoolsmsException;
|
||||
|
||||
require_once __DIR__ . "/../../bootstrap.php";
|
||||
|
||||
// api_key and api_secret can be obtained from www.coolsms.co.kr/credentials
|
||||
$api_key = '#ENTER_YOUR_OWN#';
|
||||
$api_secret = '#ENTER_YOUR_OWN#';
|
||||
|
||||
try {
|
||||
// initiate rest api sdk object
|
||||
$rest = new GroupMessage($api_key, $api_secret);
|
||||
|
||||
$result = $rest->getGroupList();
|
||||
print_r($result);
|
||||
} catch(CoolsmsException $e) {
|
||||
echo $e->getMessage(); // get error message
|
||||
echo $e->getCode(); // get error code
|
||||
}
|
||||
33
common/vendor/coolsms/php-sdk/examples/GroupMessage/example_get_message_list.php
vendored
Normal file
33
common/vendor/coolsms/php-sdk/examples/GroupMessage/example_get_message_list.php
vendored
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
/**
|
||||
* #example_message_list
|
||||
*
|
||||
* This sample code demonstrate check message list through CoolSMS Rest API PHP
|
||||
* for more info, visit
|
||||
* www.coolsms.co.kr
|
||||
*/
|
||||
|
||||
use Nurigo\Api\GroupMessage;
|
||||
use Nurigo\Exceptions\CoolsmsException;
|
||||
|
||||
require_once __DIR__ . "/../../bootstrap.php";
|
||||
|
||||
// api_key and api_secret can be obtained from www.coolsms.co.kr/credentials
|
||||
$api_key = '#ENTER_YOUR_OWN#';
|
||||
$api_secret = '#ENTER_YOUR_OWN#';
|
||||
|
||||
try {
|
||||
// initiate rest api sdk object
|
||||
$rest = new GroupMessage($api_key, $api_secret);
|
||||
|
||||
// Optional parameters for your own needs
|
||||
$group_id = 'GID57317013931B0'; // group id
|
||||
$offset = 0; // default 0
|
||||
$limit = 20; // default 20
|
||||
|
||||
$result = $rest->getMessageList($group_id, $offset, $limit);
|
||||
print_r($result);
|
||||
} catch(CoolsmsException $e) {
|
||||
echo $e->getMessage(); // get error message
|
||||
echo $e->getCode(); // get error code
|
||||
}
|
||||
31
common/vendor/coolsms/php-sdk/examples/GroupMessage/example_send.php
vendored
Normal file
31
common/vendor/coolsms/php-sdk/examples/GroupMessage/example_send.php
vendored
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
/**
|
||||
* #example_send
|
||||
*
|
||||
* This sample code demonstrate how to send group sms through CoolSMS Rest API PHP
|
||||
* for more info, visit
|
||||
* www.coolsms.co.kr
|
||||
*/
|
||||
|
||||
use Nurigo\Api\GroupMessage;
|
||||
use Nurigo\Exceptions\CoolsmsException;
|
||||
|
||||
require_once __DIR__ . "/../../bootstrap.php";
|
||||
|
||||
// api_key and api_secret can be obtained from www.coolsms.co.kr/credentials
|
||||
$api_key = '#ENTER_YOUR_OWN#';
|
||||
$api_secret = '#ENTER_YOUR_OWN#';
|
||||
|
||||
try {
|
||||
// initiate rest api sdk object
|
||||
$rest = new GroupMessage($api_key, $api_secret);
|
||||
|
||||
// group_id are mandatory. must be filled
|
||||
$group_id = 'GID56CC00E21C4DC'; // group id. ex) '1GCOLS23BDG'
|
||||
|
||||
$result = $rest->sendGroupMessage($group_id);
|
||||
print_r($result);
|
||||
} catch(CoolsmsException $e) {
|
||||
echo $e->getMessage(); // get error message
|
||||
echo $e->getCode(); // get error code
|
||||
}
|
||||
44
common/vendor/coolsms/php-sdk/examples/GroupMessage/example_send_process.php
vendored
Normal file
44
common/vendor/coolsms/php-sdk/examples/GroupMessage/example_send_process.php
vendored
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
<?php
|
||||
/**
|
||||
* #example_send_process
|
||||
*
|
||||
* This sample code demonstrate how to send group message through CoolSMS Rest API PHP
|
||||
* for more info, visit
|
||||
* www.coolsms.co.kr
|
||||
*/
|
||||
|
||||
use Nurigo\Api\GroupMessage;
|
||||
use Nurigo\Exceptions\CoolsmsException;
|
||||
|
||||
require_once __DIR__ . "/../../bootstrap.php";
|
||||
|
||||
// api_key and api_secret can be obtained from www.coolsms.co.kr/credentials
|
||||
$api_key = '#ENTER_YOUR_OWN#';
|
||||
$api_secret = '#ENTER_YOUR_OWN#';
|
||||
|
||||
try {
|
||||
$options = new stdClass();
|
||||
|
||||
// initiate rest api sdk object
|
||||
$rest = new GroupMessage($api_key, $api_secret);
|
||||
|
||||
// create group
|
||||
$result = $rest->createGroup($options);
|
||||
$group_id = $result->group_id;
|
||||
print_r($result);
|
||||
|
||||
// add messages
|
||||
$options->to = '01000000000';
|
||||
$options->from = '01000000000';
|
||||
$options->text = '안녕하세요. 10000건을 20초안에 발송하는 빠르고 저렴한 CoolSMS의 테스팅 문자입니다. ';
|
||||
$options->group_id = $group_id; // group id
|
||||
$result = $rest->addMessages($options);
|
||||
print_r($result);
|
||||
|
||||
// send messages
|
||||
$result = $rest->sendGroupMessage($group_id);
|
||||
print_r($result);
|
||||
} catch(CoolsmsException $e) {
|
||||
echo $e->getMessage(); // get error message
|
||||
echo $e->getCode(); // get error code
|
||||
}
|
||||
32
common/vendor/coolsms/php-sdk/examples/Message/example_cancel.php
vendored
Normal file
32
common/vendor/coolsms/php-sdk/examples/Message/example_cancel.php
vendored
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
/**
|
||||
* #example_cancel
|
||||
*
|
||||
* This sample code demonstrate how to cancel reserved sms through CoolSMS Rest API PHP
|
||||
* for more info, visit
|
||||
* www.coolsms.co.kr
|
||||
*/
|
||||
|
||||
use Nurigo\Api\Message;
|
||||
use Nurigo\Exceptions\CoolsmsException;
|
||||
|
||||
require_once __DIR__ . "/../../bootstrap.php";
|
||||
|
||||
// api_key and api_secret can be obtained from www.coolsms.co.kr/credentials
|
||||
$api_key = '#ENTER_YOUR_OWN#';
|
||||
$api_secret = '#ENTER_YOUR_OWN#';
|
||||
|
||||
try {
|
||||
// initiate rest api sdk object
|
||||
$rest = new Message($api_key, $api_secret);
|
||||
|
||||
// Either mid or gid must be entered.
|
||||
$options = new stdClass();
|
||||
$mid = 'M52CB443257C61'; // message id.
|
||||
$gid = 'G52CB4432576C8'; // group id.
|
||||
|
||||
$rest->cancel($mid); // if $gid is exists. ex) $rest-cancel(null, $gid);
|
||||
} catch(CoolsmsException $e) {
|
||||
echo $e->getMessage(); // get error message
|
||||
echo $e->getCode(); // get 'api.coolsms.co.kr' response code
|
||||
}
|
||||
29
common/vendor/coolsms/php-sdk/examples/Message/example_get_balance.php
vendored
Normal file
29
common/vendor/coolsms/php-sdk/examples/Message/example_get_balance.php
vendored
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
/**
|
||||
* #example_balance
|
||||
*
|
||||
* This sample code demonstrate how to check cash & point balance through CoolSMS Rest API PHP
|
||||
* for more info, visit
|
||||
* www.coolsms.co.kr
|
||||
*/
|
||||
|
||||
use Nurigo\Api\Message;
|
||||
use Nurigo\Exceptions\CoolsmsException;
|
||||
|
||||
require_once __DIR__ . "/../../bootstrap.php";
|
||||
|
||||
|
||||
// api_key and api_secret can be obtained from www.coolsms.co.kr/credentials
|
||||
$api_key = '#ENTER_YOUR_OWN#';
|
||||
$api_secret = '#ENTER_YOUR_OWN#';
|
||||
|
||||
try {
|
||||
// initiate rest api sdk object
|
||||
$rest = new Message($api_key, $api_secret);
|
||||
|
||||
$result = $rest->getBalance();
|
||||
print_r($result);
|
||||
} catch (CoolsmsException $e) {
|
||||
echo $e->getMessage(); // get error message
|
||||
echo $e->getCode(); // get error code
|
||||
}
|
||||
35
common/vendor/coolsms/php-sdk/examples/Message/example_get_status.php
vendored
Normal file
35
common/vendor/coolsms/php-sdk/examples/Message/example_get_status.php
vendored
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
<?php
|
||||
/**
|
||||
* #example_sent
|
||||
*
|
||||
* This sample code demonstrate how to check sms result through CoolSMS Rest API PHP
|
||||
* for more info, visit
|
||||
* www.coolsms.co.kr
|
||||
*/
|
||||
|
||||
use Nurigo\Api\Message;
|
||||
use Nurigo\Exceptions\CoolsmsException;
|
||||
|
||||
require_once __DIR__ . "/../../bootstrap.php";
|
||||
|
||||
// api_key and api_secret can be obtained from www.coolsms.co.kr/credentials
|
||||
$api_key = '#ENTER_YOUR_OWN#';
|
||||
$api_secret = '#ENTER_YOUR_OWN#';
|
||||
|
||||
try {
|
||||
// initiate rest api sdk object
|
||||
$rest = new Message($api_key, $api_secret);
|
||||
|
||||
// set necessary options
|
||||
$options = new stdClass();
|
||||
// $options->count = '1'; // 기본값 1이며 1개의 최신 레코드를 받을 수 있음. 10입력시 10분동안의 레코드 목록을 리턴
|
||||
// $options->unit = 'minute'; // minute(default), hour, day 중 하나 해당 단위의 평균
|
||||
// $options->date = '20161016230000'; // 데이터를 읽어오는 기준 시각
|
||||
// $options->channel = '1'; // 1 : 1건 발송채널(default), 2 : 대량 발송 채널
|
||||
|
||||
$result = $rest->getStatus($options);
|
||||
print_r($result);
|
||||
} catch(CoolsmsException $e) {
|
||||
echo $e->getMessage(); // get error message
|
||||
echo $e->getCode(); // get error code
|
||||
}
|
||||
52
common/vendor/coolsms/php-sdk/examples/Message/example_send.php
vendored
Normal file
52
common/vendor/coolsms/php-sdk/examples/Message/example_send.php
vendored
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
<?php
|
||||
/**
|
||||
* #example_send
|
||||
*
|
||||
* This sample code demonstrate how to send sms through CoolSMS Rest API PHP
|
||||
* for more info, visit
|
||||
* www.coolsms.co.kr
|
||||
*/
|
||||
|
||||
use Nurigo\Api\Message;
|
||||
use Nurigo\Exceptions\CoolsmsException;
|
||||
|
||||
require_once __DIR__ . "/../../bootstrap.php";
|
||||
|
||||
// api_key and api_secret can be obtained from www.coolsms.co.kr/credentials
|
||||
$api_key = '#ENTER_YOUR_OWN#';
|
||||
$api_secret = '#ENTER_YOUR_OWN#';
|
||||
|
||||
try {
|
||||
// initiate rest api sdk object
|
||||
$rest = new Message($api_key, $api_secret);
|
||||
|
||||
// 4 options(to, from, type, text) are mandatory. must be filled
|
||||
$options = new stdClass();
|
||||
$options->to = '01000000000'; // 수신번호
|
||||
$options->from = '01000000000'; // 발신번호
|
||||
$options->type = 'SMS'; // Message type ( SMS, LMS, MMS, ATA )
|
||||
$options->text = '안녕하세요. 10000건을 20초안에 발송하는 빠르고 저렴한 CoolSMS의 테스팅 문자입니다. '; // 문자내용
|
||||
|
||||
// Optional parameters for your own needs
|
||||
// $options->image = '../Image/images/test.jpg'; // image for MMS. type must be set as 'MMS'
|
||||
// $options->image_encoding = 'binary'; // image encoding binary(default), base64
|
||||
// $options->mode = 'test'; // 'test' 모드. 실제로 발송되지 않으며 전송내역에 60 오류코드로 뜹니다. 차감된 캐쉬는 다음날 새벽에 충전 됩니다.
|
||||
// $options->delay = 10; // 0~20사이의 값으로 전송지연 시간을 줄 수 있습니다.
|
||||
// $options->force_sms = true; // 푸시 및 알림톡 이용시에도 강제로 SMS로 발송되도록 할 수 있습니다.
|
||||
// $options->refname = ''; // Reference name
|
||||
// $options->country = 'KR'; // Korea(KR) Japan(JP) America(USA) China(CN) Default is Korea
|
||||
// $options->datetime = '20140106153000'; // Format must be(YYYYMMDDHHMISS) 2014 01 06 15 30 00 (2014 Jan 06th 3pm 30 00)
|
||||
// $options->mid = 'mymsgid01'; // set message id. Server creates automatically if empty
|
||||
// $options->gid = 'mymsg_group_id01'; // set group id. Server creates automatically if empty
|
||||
// $options->subject = 'Hello World'; // set msg title for LMS and MMS
|
||||
// $options->charset = 'euckr'; // For Korean language, set euckr or utf-8
|
||||
// $options->sender_key = '55540253a3e61072...'; // 알림톡 사용을 위해 필요합니다. 신청방법 : http://www.coolsms.co.kr/AboutAlimTalk
|
||||
// $options->template_code = 'C004'; // 알림톡 template code 입니다. 자세한 설명은 http://www.coolsms.co.kr/AboutAlimTalk을 참조해주세요.
|
||||
// $options->app_version = 'Purplebook 4.1' // 어플리케이션 버전
|
||||
|
||||
$result = $rest->send($options);
|
||||
print_r($result);
|
||||
} catch(CoolsmsException $e) {
|
||||
echo $e->getMessage(); // get error message
|
||||
echo $e->getCode(); // get error code
|
||||
}
|
||||
38
common/vendor/coolsms/php-sdk/examples/Message/example_sent.php
vendored
Normal file
38
common/vendor/coolsms/php-sdk/examples/Message/example_sent.php
vendored
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
/**
|
||||
* #example_sent
|
||||
*
|
||||
* This sample code demonstrate how to check sms result through CoolSMS Rest API PHP
|
||||
* for more info, visit
|
||||
* www.coolsms.co.kr
|
||||
*/
|
||||
|
||||
use Nurigo\Api\Message;
|
||||
use Nurigo\Exceptions\CoolsmsException;
|
||||
|
||||
require_once __DIR__ . "/../../bootstrap.php";
|
||||
|
||||
// api_key and api_secret can be obtained from www.coolsms.co.kr/credentials
|
||||
$api_key = '#ENTER_YOUR_OWN#';
|
||||
$api_secret = '#ENTER_YOUR_OWN#';
|
||||
|
||||
try {
|
||||
// initiate rest api sdk object
|
||||
$rest = new Message($api_key, $api_secret);
|
||||
|
||||
// set necessary options
|
||||
$options = new stdClass();
|
||||
$options->message_id = 'M52CB443257C61'; //message id
|
||||
// $options->group_id = 'G52CB4432576C8'; //group id
|
||||
// $options->count = '40'; //result return counts. default is 20
|
||||
// $options->page = '1'; //page
|
||||
// $options->rcpt = '01012345678'; //search sent result by recipient number
|
||||
// $options->start = '201401070915'; //set search start date ex) 201401070915
|
||||
// $options->end = '201401071230'; //set search end date ex) 201401071230
|
||||
|
||||
$result = $rest->sent($options);
|
||||
print_r($result);
|
||||
} catch(CoolsmsException $e) {
|
||||
echo $e->getMessage(); // get error message
|
||||
echo $e->getCode(); // get error code
|
||||
}
|
||||
31
common/vendor/coolsms/php-sdk/examples/image/example_delete_images.php
vendored
Normal file
31
common/vendor/coolsms/php-sdk/examples/image/example_delete_images.php
vendored
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
/**
|
||||
* #example_delete_images
|
||||
*
|
||||
* This sample code demonstrate how to delete images through CoolSMS Rest API PHP
|
||||
* for more info, visit
|
||||
* www.coolsms.co.kr
|
||||
*/
|
||||
|
||||
use Nurigo\Api\Image;
|
||||
use Nurigo\Exceptions\CoolsmsException;
|
||||
|
||||
require_once __DIR__ . "/../../bootstrap.php";
|
||||
|
||||
// api_key and api_secret can be obtained from www.coolsms.co.kr/credentials
|
||||
$api_key = '#ENTER_YOUR_OWN#';
|
||||
$api_secret = '#ENTER_YOUR_OWN#';
|
||||
|
||||
try {
|
||||
// initiate rest api sdk object
|
||||
$rest = new Image($api_key, $api_secret);
|
||||
|
||||
// image_ids are mandatory. must be filled
|
||||
$image_ids = ''; // image ids. ex)'IM34BWIDJ12','IMG2559GBB'
|
||||
|
||||
$result = $rest->deleteImages($image_ids);
|
||||
print_r($result);
|
||||
} catch(CoolsmsException $e) {
|
||||
echo $e->getMessage(); // get error message
|
||||
echo $e->getCode(); // get error code
|
||||
}
|
||||
31
common/vendor/coolsms/php-sdk/examples/image/example_get_image_info.php
vendored
Normal file
31
common/vendor/coolsms/php-sdk/examples/image/example_get_image_info.php
vendored
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
/**
|
||||
* #example_image_info
|
||||
*
|
||||
* This sample code demonstrate how to check image info through CoolSMS Rest API PHP
|
||||
* for more info, visit
|
||||
* www.coolsms.co.kr
|
||||
*/
|
||||
|
||||
use Nurigo\Api\Image;
|
||||
use Nurigo\Exceptions\CoolsmsException;
|
||||
|
||||
require_once __DIR__ . "/../../bootstrap.php";
|
||||
|
||||
// api_key and api_secret can be obtained from www.coolsms.co.kr/credentials
|
||||
$api_key = '#ENTER_YOUR_OWN#';
|
||||
$api_secret = '#ENTER_YOUR_OWN#';
|
||||
|
||||
try {
|
||||
// initiate rest api sdk object
|
||||
$rest = new Image($api_key, $api_secret);
|
||||
|
||||
// image_id are mandatory. must be filled
|
||||
$image_id = ''; // image id
|
||||
|
||||
$result = $rest->getImageInfo($image_id);
|
||||
print_r($result);
|
||||
} catch(CoolsmsException $e) {
|
||||
echo $e->getMessage(); // get error message
|
||||
echo $e->getCode(); // get error code
|
||||
}
|
||||
32
common/vendor/coolsms/php-sdk/examples/image/example_get_image_list.php
vendored
Normal file
32
common/vendor/coolsms/php-sdk/examples/image/example_get_image_list.php
vendored
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
/**
|
||||
* #example_image_list
|
||||
*
|
||||
* This sample code demonstrate how to check image list through CoolSMS Rest API PHP
|
||||
* for more info, visit
|
||||
* www.coolsms.co.kr
|
||||
*/
|
||||
|
||||
use Nurigo\Api\Image;
|
||||
use Nurigo\Exceptions\CoolsmsException;
|
||||
|
||||
require_once __DIR__ . "/../../bootstrap.php";
|
||||
|
||||
// api_key and api_secret can be obtained from www.coolsms.co.kr/credentials
|
||||
$api_key = '#ENTER_YOUR_OWN#';
|
||||
$api_secret = '#ENTER_YOUR_OWN#';
|
||||
|
||||
try {
|
||||
// initiate rest api sdk object
|
||||
$rest = new Image($api_key, $api_secret);
|
||||
|
||||
// Optional parameters for your own needs
|
||||
$offset = 0; // default 0
|
||||
$limit = 20; // default 20
|
||||
|
||||
$result = $rest->getImageList($offset, $limit);
|
||||
print_r($result);
|
||||
} catch(CoolsmsException $e) {
|
||||
echo $e->getMessage(); // get error message
|
||||
echo $e->getCode(); // get error code
|
||||
}
|
||||
34
common/vendor/coolsms/php-sdk/examples/image/example_upload_image.php
vendored
Normal file
34
common/vendor/coolsms/php-sdk/examples/image/example_upload_image.php
vendored
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
/**
|
||||
* #example_upload_image
|
||||
*
|
||||
* This sample code demonstrate how to upload image through CoolSMS Rest API PHP
|
||||
* for more info, visit
|
||||
* www.coolsms.co.kr
|
||||
*/
|
||||
|
||||
use Nurigo\Api\Image;
|
||||
use Nurigo\Exceptions\CoolsmsException;
|
||||
|
||||
require_once __DIR__ . "/../../bootstrap.php";
|
||||
|
||||
// api_key and api_secret can be obtained from www.coolsms.co.kr/credentials
|
||||
$api_key = '#ENTER_YOUR_OWN#';
|
||||
$api_secret = '#ENTER_YOUR_OWN#';
|
||||
|
||||
try {
|
||||
// initiate rest api sdk object
|
||||
$rest = new Image($api_key, $api_secret);
|
||||
|
||||
// image are mandatory. must be filled
|
||||
$image = 'images/test.jpg'; // image
|
||||
|
||||
// Optional parameters for your own needs
|
||||
// $encoding = 'binary'; // image encoding type (base64, binary) default binary
|
||||
|
||||
$result = $rest->uploadImage($image); // or $rest->uploadImage($image, $encoding)
|
||||
print_r($result);
|
||||
} catch(CoolsmsException $e) {
|
||||
echo $e->getMessage(); // get error message
|
||||
echo $e->getCode(); // get error code
|
||||
}
|
||||
BIN
common/vendor/coolsms/php-sdk/examples/image/images/test.jpg
vendored
Normal file
BIN
common/vendor/coolsms/php-sdk/examples/image/images/test.jpg
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.5 KiB |
31
common/vendor/coolsms/php-sdk/examples/senderid/example_delete.php
vendored
Normal file
31
common/vendor/coolsms/php-sdk/examples/senderid/example_delete.php
vendored
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
/**
|
||||
* #example_delete
|
||||
*
|
||||
* This sample code demonstrate how to delete sender number through CoolSMS Rest API PHP
|
||||
* for more info, visit
|
||||
* www.coolsms.co.kr
|
||||
*/
|
||||
|
||||
use Nurigo\Api\SenderID;
|
||||
use Nurigo\Exceptions\CoolsmsException;
|
||||
|
||||
require_once __DIR__ . "/../../bootstrap.php";
|
||||
|
||||
// api_key and api_secret can be obtained from www.coolsms.co.kr/credentials
|
||||
$api_key = '#ENTER_YOUR_OWN#';
|
||||
$api_secret = '#ENTER_YOUR_OWN#';
|
||||
|
||||
try {
|
||||
// initiate rest api sdk object
|
||||
$rest = new SenderID($api_key, $api_secret);
|
||||
|
||||
// handle_key are mandatory. must be filled
|
||||
$handle_key = 'C29CE02IOE9'; // sender number handle key. check for 'example_list'
|
||||
|
||||
$result = $rest->delete($handle_key);
|
||||
print_r($result);
|
||||
} catch(CoolsmsException $e) {
|
||||
echo $e->getMessage(); // get error message
|
||||
echo $e->getCode(); // get error code
|
||||
}
|
||||
31
common/vendor/coolsms/php-sdk/examples/senderid/example_get_default.php
vendored
Normal file
31
common/vendor/coolsms/php-sdk/examples/senderid/example_get_default.php
vendored
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
/**
|
||||
* #example_get_default
|
||||
*
|
||||
* This sample code demonstrate how to get default sender number through CoolSMS Rest API PHP
|
||||
* for more info, visit
|
||||
* www.coolsms.co.kr
|
||||
*/
|
||||
|
||||
use Nurigo\Api\SenderID;
|
||||
use Nurigo\Exceptions\CoolsmsException;
|
||||
|
||||
require_once __DIR__ . "/../../bootstrap.php";
|
||||
|
||||
// api_key and api_secret can be obtained from www.coolsms.co.kr/credentials
|
||||
$api_key = '#ENTER_YOUR_OWN#';
|
||||
$api_secret = '#ENTER_YOUR_OWN#';
|
||||
|
||||
try {
|
||||
// initiate rest api sdk object
|
||||
$rest = new SenderID($api_key, $api_secret);
|
||||
|
||||
// Optional parameters for your own needs
|
||||
// $site_user = 'admin'; // site user_id. '__private__' is default value
|
||||
|
||||
$result = $rest->getDefault(); // or $rest->getDefault($site_user);
|
||||
print_r($result);
|
||||
} catch(CoolsmsException $e) {
|
||||
echo $e->getMessage(); // get error message
|
||||
echo $e->getCode(); // get error code
|
||||
}
|
||||
31
common/vendor/coolsms/php-sdk/examples/senderid/example_get_sender_id_list.php
vendored
Normal file
31
common/vendor/coolsms/php-sdk/examples/senderid/example_get_sender_id_list.php
vendored
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
/**
|
||||
* #example_list
|
||||
*
|
||||
* This sample code demonstrate how to check sender number list through CoolSMS Rest API PHP
|
||||
* for more info, visit
|
||||
* www.coolsms.co.kr
|
||||
*/
|
||||
|
||||
use Nurigo\Api\SenderID;
|
||||
use Nurigo\Exceptions\CoolsmsException;
|
||||
|
||||
require_once __DIR__ . "/../../bootstrap.php";
|
||||
|
||||
// api_key and api_secret can be obtained from www.coolsms.co.kr/credentials
|
||||
$api_key = '#ENTER_YOUR_OWN#';
|
||||
$api_secret = '#ENTER_YOUR_OWN#';
|
||||
|
||||
try {
|
||||
// initiate rest api sdk object
|
||||
$rest = new SenderID($api_key, $api_secret);
|
||||
|
||||
// Optional parameters for your own needs
|
||||
// $site_user = 'admin'; // site user_id. '__private__' is default value
|
||||
|
||||
$result = $rest->getSenderidList(); // or $rest->senderidList($site_user);
|
||||
print_r($result);
|
||||
} catch(CoolsmsException $e) {
|
||||
echo $e->getMessage(); // get error message
|
||||
echo $e->getCode(); // get error code
|
||||
}
|
||||
34
common/vendor/coolsms/php-sdk/examples/senderid/example_register.php
vendored
Normal file
34
common/vendor/coolsms/php-sdk/examples/senderid/example_register.php
vendored
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
/**
|
||||
* #example_register
|
||||
*
|
||||
* This sample code demonstrate how to request sender number register through CoolSMS Rest API PHP
|
||||
* for more info, visit
|
||||
* www.coolsms.co.kr
|
||||
*/
|
||||
|
||||
use Nurigo\Api\SenderID;
|
||||
use Nurigo\Exceptions\CoolsmsException;
|
||||
|
||||
require_once __DIR__ . "/../../bootstrap.php";
|
||||
|
||||
// api_key and api_secret can be obtained from www.coolsms.co.kr/credentials
|
||||
$api_key = '#ENTER_YOUR_OWN#';
|
||||
$api_secret = '#ENTER_YOUR_OWN#';
|
||||
|
||||
try {
|
||||
// initiate rest api sdk object
|
||||
$rest = new SenderID($api_key, $api_secret);
|
||||
|
||||
// phone are mandatory. must be filled
|
||||
$phone = '01000000000'; // sender number to register
|
||||
|
||||
// Optional parameters for your own needs
|
||||
// $site_user = 'admin'; // site user_id. '__private__' is default value
|
||||
|
||||
$result = $rest->register($phone); // or $rest->register($phone, $site_user);
|
||||
print_r($result);
|
||||
} catch(CoolsmsException $e) {
|
||||
echo $e->getMessage(); // get error message
|
||||
echo $e->getCode(); // get error code
|
||||
}
|
||||
34
common/vendor/coolsms/php-sdk/examples/senderid/example_set_default.php
vendored
Normal file
34
common/vendor/coolsms/php-sdk/examples/senderid/example_set_default.php
vendored
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
/**
|
||||
* #example_set_default
|
||||
*
|
||||
* This sample code demonstrate how to set default sender number through CoolSMS Rest API PHP
|
||||
* for more info, visit
|
||||
* www.coolsms.co.kr
|
||||
*/
|
||||
|
||||
use Nurigo\Api\SenderID;
|
||||
use Nurigo\Exceptions\CoolsmsException;
|
||||
|
||||
require_once __DIR__ . "/../../bootstrap.php";
|
||||
|
||||
// api_key and api_secret can be obtained from www.coolsms.co.kr/credentials
|
||||
$api_key = '#ENTER_YOUR_OWN#';
|
||||
$api_secret = '#ENTER_YOUR_OWN#';
|
||||
|
||||
try {
|
||||
// initiate rest api sdk object
|
||||
$rest = new SenderID($api_key, $api_secret);
|
||||
|
||||
// handle_key are mandatory. must be filled
|
||||
$handle_key = 'C29CE02IOE9'; // sender number handle key. check for 'example_list'
|
||||
|
||||
// Optional parameters for your own needs
|
||||
// $site_user = 'admin'; // site user_id. '__private__' is default value
|
||||
|
||||
$result = $rest->setDefault($handle_key); // or $rest->setDefault($handle_key, $site_user);
|
||||
print_r($result);
|
||||
} catch(CoolsmsException $e) {
|
||||
echo $e->getMessage(); // get error message
|
||||
echo $e->getCode(); // get error code
|
||||
}
|
||||
31
common/vendor/coolsms/php-sdk/examples/senderid/example_verify.php
vendored
Normal file
31
common/vendor/coolsms/php-sdk/examples/senderid/example_verify.php
vendored
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
/**
|
||||
* #example_verify
|
||||
*
|
||||
* This sample code demonstrate how to verify sender number through CoolSMS Rest API PHP
|
||||
* for more info, visit
|
||||
* www.coolsms.co.kr
|
||||
*/
|
||||
|
||||
use Nurigo\Api\SenderID;
|
||||
use Nurigo\Exceptions\CoolsmsException;
|
||||
|
||||
require_once __DIR__ . "/../../bootstrap.php";
|
||||
|
||||
// api_key and api_secret can be obtained from www.coolsms.co.kr/credentials
|
||||
$api_key = '#ENTER_YOUR_OWN#';
|
||||
$api_secret = '#ENTER_YOUR_OWN#';
|
||||
|
||||
try {
|
||||
// initiate rest api sdk object
|
||||
$rest = new SenderID($api_key, $api_secret);
|
||||
|
||||
// handle_key are mandatory. must be filled
|
||||
$handle_key = 'C29CE02IOE9'; // after register call. return value
|
||||
|
||||
$result = $rest->verify($handle_key);
|
||||
print_r($result);
|
||||
} catch(CoolsmsException $e) {
|
||||
echo $e->getMessage(); // get error message
|
||||
echo $e->getCode(); // get error code
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue