-
Notifications
You must be signed in to change notification settings - Fork 0
/
sendBlock.php
32 lines (29 loc) · 976 Bytes
/
sendBlock.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
$json_data = file_get_contents("php://input");
$obj_json = json_decode($json_data);
$received = $obj_json->action->detailParams;
$class1 = $received->Classes->value;
//$class2 = $received->class2->value;
//$class3 = $received->class3->value;
//$class4 = $received->class4->value;
//$class5 = $received->class5->value;
//$class6 = $received->class6->value;
//$schedule = '당신의 스케줄: '.$class1.', '.$class2.', '.$class3.', '.$class4.', '.$class5.', '.$class6.'입니다.';
$schedule = '당신의 스케줄: '.$class1.' 수업을 들어야해요.';
$jayParseAry = [
"version" => "2.0",
"template" => [
"outputs" => [
[
"basicCard" => [
"title" => "testing",
"description" => $schedule,
"thumbnail" => [
"imageUrl" => "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcT4BJ9LU4Ikr_EvZLmijfcjzQKMRCJ2bO3A8SVKNuQ78zu2KOqM"
]
]
]
]
]
];
echo json_encode($jayParseAry, JSON_UNESCAPED_UNICODE);