Skip to content

Commit 66876a5

Browse files
Merge pull request #12 from Palbangmiyine/master
PHP SDK 4.0.1:
2 parents 9701101 + 13c210f commit 66876a5

57 files changed

Lines changed: 1475 additions & 1292 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 91 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,102 @@
11
# SOLAPI PHP
2+
23
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
34

45
## Introduction
6+
57
- PHP용 솔라피 SDK
8+
- PHP 5.6 이상 호환
9+
10+
## 주의사항
11+
12+
- 반드시 php 내 curl, json extension 등이 설치되어 있는지 확인해주세요.
13+
14+
## 각 예제 폴더 별 안내사항
15+
16+
### 문자 발송 관련 예제 파일들
17+
18+
```
19+
examples/sms/send_sms.php 단문 문자 발송 예제
20+
examples/sms/send_lms.php 장문 문자 발송 예제
21+
examples/sms/send_mms.php 사진 문자 발송 예제
22+
examples/sms/set_scheduled_messages.php 메시지 예약 발송 예제
23+
examples/sms/send_send_versea.php 해외 문자(SMS Only) 발송 예제
24+
examples/sms/send_messages_with_auto_type_detect.php 문자 유형 감지 발송 예제
25+
```
26+
27+
### 카카오 메시지(알림톡, 친구톡) 발송 관련 예제 파일들
28+
29+
```
30+
examples/kakaotalk/send_alimtalk.php 알림톡 발송 예제
31+
examples/kakaotalk/send_chingutalk.php 친구톡 발송 예제
32+
examples/kakaotalk/send_chingutalk_button.php 친구톡 버튼 발송 예제
33+
examples/kakaotalk/send_chingutalk_image.php 이미지가 포함된 친구톡 발송 예제
34+
```
35+
36+
### 그룹 발송 예제 파일들
37+
38+
```
39+
examples/group_message/group_create.php 그룹 생성
40+
examples/group_message/group_get_info.php 그룹 정보 조회
41+
examples/group_message/group_delete.php 그룹 삭제
42+
examples/group_message/group_get_list.php 그룹 목록 조회
43+
examples/group_message/group_add_messages.php 그룹 메시지 추가
44+
examples/group_message/group_delete_messages.php 그룹 메시지 삭제
45+
examples/group_message/group_get_messages.php 그룹 메시지 조회
46+
examples/group_message/group_send_messages.php 그룹 메시지 전송(종합 예제)
47+
examples/group_message/set_reservation_group.php 그룹 예약설정
48+
```
49+
50+
### 발송내역 조회 관련 예제 파일들
651

7-
## Pull Requests
8-
Please use issues section for any suggestions and issues.
9-
Any pull-requests are always welcomed and fill free to send.
52+
```
53+
exmaples/message_list/simple_list.php 기본 예제
54+
exmaples/message_list/print_details.php 메시지 상세 항목 출력
55+
exmaples/message_list/search_date.php 날짜 검색
56+
exmaples/message_list/search_messageId.php 메시지아이디 검색
57+
exmaples/message_list/search_groupId.php 그룹아이디 검색
58+
exmaples/message_list/search_status.php 상태코드 검색
59+
exmaples/message_list/search_to.php 수신번호 검색
60+
exmaples/message_list/pagination.php 페이지 처리
61+
```
62+
63+
### 발신번호 인증/생성 관련 예제 파일들
64+
65+
```
66+
examples/senderid/create_number.php 발신번호 생성 예제(STEP 1)
67+
examples/senderid/request_voicecall.php 전화번호 인증(ARS) 예제(STEP 2)
68+
examples/senderid/verify_token.php ARS 인증번호 확인 예제(STEP 3)
69+
examples/senderid/active_numbers.php 활성화 된 발신번호 리스트 조회 예제
70+
```
71+
72+
### 카카오 채널/템플릿 조회 관련 예제 목록
73+
74+
```
75+
examples/kakaotalk_channels(디렉토리) 카카오 비즈니스 채널 조회 관련 예제 포함
76+
examples/kakaotalk_templates(디렉토리) 카카오 알림톡 템플릿 조회 관련 예제 포함
77+
```
78+
79+
### 네이버 톡톡 발송 예제
80+
81+
```
82+
examples/naver/send_naver.php 네이버톡톡(스마트알림) 발송(버튼 포함) 예제
83+
````
84+
85+
### RCS 발송 예제 목록
86+
87+
```
88+
examples/rcs(디렉토리) RCS SMS/LMS/MMS(s3, s6)/TPL(템플릿) 발송 예제 포함
89+
```
90+
91+
### 기타
92+
93+
```
94+
examples/statistics/statistics.php 통계 조회 예제
95+
examples/get_balance.php 잔액 조회 예제
96+
```
1097
1198
## License
99+
12100
MIT License(https://opensource.org/licenses/MIT)
13101
14102

config-dist.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?php
22
function get_config() {
33
return array(
4-
"apiKey" => "NCSVYGF1IK5PUKDA",
5-
"apiSecret" => "FSD4ER2WYPZQVDBPKMLOZVAWTGYBDTRW",
4+
"apiKey" => "INPUT API KEY",
5+
"apiSecret" => "INPUT API SECRET KEY",
66
"protocol" => "https",
77
"domain" => "api.solapi.com",
88
"prefix" => ""

examples/README.md

Lines changed: 0 additions & 54 deletions
This file was deleted.

examples/auto_type_detect.php

Lines changed: 0 additions & 29 deletions
This file was deleted.

examples/get_balance.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
*/
55
require_once("../lib/message.php");
66
$res = get_balance();
7-
echo "Balance: {$res->balance}, Point: {$res->point}";
7+
echo "잔액: {$res->balance}, 포인트: {$res->point}";

examples/group_message/group_add_messages.php

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -12,50 +12,50 @@
1212

1313
// 메시지 추가
1414
print_r(add_messages($groupId, array(
15-
array(
16-
"to" => "01000010001",
17-
"from" => "029302266",
18-
"text" => "한글 45자, 영자 90자 이하 입력되면 자동으로 SMS타입의 메시지가 추가됩니다."
19-
),
20-
array(
21-
"to" => "01000010002",
22-
"from" => "029302266",
23-
"text" => "한글 45자, 영자 90자 이상 입력되면 자동으로 LMS타입의 문자메시자가 발송됩니다. 0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZ"
24-
),
25-
// 타입을 명시할 경우 text 길이가 한글 45 혹은 영자 90자를 넘을 경우 오류가 발생합니다.
26-
array(
27-
"type" => "SMS", // 타입명시
28-
"to" => "01000010003",
29-
"from" => "029302266",
30-
"text" => "SMS 타입에 한글 45자, 영자 90자 이상 입력되면 오류가 발생합니다. 0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZ"
31-
),
32-
array(
33-
"to" => "01000010004",
34-
"from" => "029302266",
35-
"text" => "한글 45자, 영자 90자 이상 입력되면 자동으로 LMS타입의 문자메시지가 발송됩니다. 0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZ"
36-
),
37-
array(
38-
"to" => "01000010005",
39-
"from" => "029302266",
40-
"subject" => "LMS 제목", // 제목을 지정할 수 있습니다.
41-
"text" => "한글 45자, 영자 90자 이상 입력되면 자동으로 LMS타입의 문자메시지가 발송됩니다. 0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZ"
42-
),
43-
array(
44-
"type" => "LMS", // 타입을 명시할 수 있습니다.
45-
"to" => "01000010006",
46-
"from" => "029302266",
47-
"text" => "내용이 짧아도 LMS로 발송됩니다."
48-
),
49-
array(
50-
"to" => "01000010007",
51-
"from" => "029302266",
52-
"subject" => "MMS 제목",
53-
"text" => "MMS 이미지 발송",
54-
"imageId" => $imageId
55-
),
56-
array(
57-
"to" => array("01000010008", "01000010009"), // 수신번호를 array로 입력하면 같은 내용을 여러명에게 보낼 수 있습니다.
58-
"from" => "029302266",
59-
"text" => "한글 45자, 영자 90자 이상 입력되면 자동으로 LMS타입의 문자메시지가 발송됩니다. 0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZ"
60-
)
15+
array(
16+
"to" => "01000010001",
17+
"from" => "029302266",
18+
"text" => "한글 45자, 영자 90자 이하 입력되면 자동으로 SMS타입의 메시지가 추가됩니다."
19+
),
20+
array(
21+
"to" => "01000010002",
22+
"from" => "029302266",
23+
"text" => "한글 45자, 영자 90자 이상 입력되면 자동으로 LMS타입의 문자메시자가 발송됩니다. 0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZ"
24+
),
25+
// 타입을 명시할 경우 text 길이가 한글 45 혹은 영자 90자를 넘을 경우 오류가 발생합니다.
26+
array(
27+
"type" => "SMS", // 타입명시
28+
"to" => "01000010003",
29+
"from" => "029302266",
30+
"text" => "SMS 타입에 한글 45자, 영자 90자 이상 입력되면 오류가 발생합니다. 0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZ"
31+
),
32+
array(
33+
"to" => "01000010004",
34+
"from" => "029302266",
35+
"text" => "한글 45자, 영자 90자 이상 입력되면 자동으로 LMS타입의 문자메시지가 발송됩니다. 0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZ"
36+
),
37+
array(
38+
"to" => "01000010005",
39+
"from" => "029302266",
40+
"subject" => "LMS 제목", // 제목을 지정할 수 있습니다.
41+
"text" => "한글 45자, 영자 90자 이상 입력되면 자동으로 LMS타입의 문자메시지가 발송됩니다. 0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZ"
42+
),
43+
array(
44+
"type" => "LMS", // 타입을 명시할 수 있습니다.
45+
"to" => "01000010006",
46+
"from" => "029302266",
47+
"text" => "내용이 짧아도 LMS로 발송됩니다."
48+
),
49+
array(
50+
"to" => "01000010007",
51+
"from" => "029302266",
52+
"subject" => "MMS 제목",
53+
"text" => "MMS 이미지 발송",
54+
"imageId" => $imageId
55+
),
56+
array(
57+
"to" => array("01000010008", "01000010009"), // 수신번호를 array로 입력하면 같은 내용을 여러명에게 보낼 수 있습니다.
58+
"from" => "029302266",
59+
"text" => "한글 45자, 영자 90자 이상 입력되면 자동으로 LMS타입의 문자메시지가 발송됩니다. 0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZ"
60+
)
6161
)));

examples/group_message/group_delete_messages.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66

77
$groupId = create_group();
88
$result = add_messages($groupId, array(
9-
array(
10-
"to" => "01000010001",
11-
"from" => "029302266",
12-
"text" => "한글 45자, 영자 90자 이하 입력되면 자동으로 SMS타입의 메시지가 추가됩니다."
13-
),
14-
array(
15-
"to" => "01000010002",
16-
"from" => "029302266",
17-
"text" => "한글 45자, 영자 90자 이상 입력되면 자동으로 LMS타입의 문자메시자가 발송됩니다. 0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZ"
18-
)
9+
array(
10+
"to" => "01000010001",
11+
"from" => "029302266",
12+
"text" => "한글 45자, 영자 90자 이하 입력되면 자동으로 SMS타입의 메시지가 추가됩니다."
13+
),
14+
array(
15+
"to" => "01000010002",
16+
"from" => "029302266",
17+
"text" => "한글 45자, 영자 90자 이상 입력되면 자동으로 LMS타입의 문자메시자가 발송됩니다. 0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZ"
18+
)
1919
));
2020
print_r(delete_messages($groupId, $result->resultList[0]->messageId));

0 commit comments

Comments
 (0)