Guest User

Untitled

a guest
May 22nd, 2019
77
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if($chat=='TESTER'){
  2.  
  3. $push = array(
  4. "to" => $userId,
  5. "messages" => array (
  6. 'type' => 'bubble',
  7. 'hero' =>
  8. array (
  9. 'type' => 'image',
  10. 'url' => 'https://scdn.line-apps.com/n/channel_devcenter/img/fx/01_1_cafe.png',
  11. 'size' => 'full',
  12. 'aspectRatio' => '20:13',
  13. 'aspectMode' => 'cover',
  14. 'action' =>
  15. array (
  16. 'type' => 'uri',
  17. 'uri' => 'http://linecorp.com/',
  18. ),
  19. ),
  20. 'body' =>
  21. array (
  22. 'type' => 'box',
  23. 'layout' => 'vertical',
  24. 'contents' =>
  25. array (
  26. 0 =>
  27. array (
  28. 'type' => 'text',
  29. 'text' => 'Brown Cafe',
  30. 'weight' => 'bold',
  31. 'size' => 'xl',
  32. ),
  33. 1 =>
  34. array (
  35. 'type' => 'box',
  36. 'layout' => 'baseline',
  37. 'margin' => 'md',
  38. 'contents' =>
  39. array (
  40. 0 =>
  41. array (
  42. 'type' => 'icon',
  43. 'size' => 'sm',
  44. 'url' => 'https://scdn.line-apps.com/n/channel_devcenter/img/fx/review_gold_star_28.png',
  45. ),
  46. 1 =>
  47. array (
  48. 'type' => 'icon',
  49. 'size' => 'sm',
  50. 'url' => 'https://scdn.line-apps.com/n/channel_devcenter/img/fx/review_gold_star_28.png',
  51. ),
  52. 2 =>
  53. array (
  54. 'type' => 'icon',
  55. 'size' => 'sm',
  56. 'url' => 'https://scdn.line-apps.com/n/channel_devcenter/img/fx/review_gold_star_28.png',
  57. ),
  58. 3 =>
  59. array (
  60. 'type' => 'icon',
  61. 'size' => 'sm',
  62. 'url' => 'https://scdn.line-apps.com/n/channel_devcenter/img/fx/review_gold_star_28.png',
  63. ),
  64. 4 =>
  65. array (
  66. 'type' => 'icon',
  67. 'size' => 'sm',
  68. 'url' => 'https://scdn.line-apps.com/n/channel_devcenter/img/fx/review_gray_star_28.png',
  69. ),
  70. 5 =>
  71. array (
  72. 'type' => 'text',
  73. 'text' => '4.0',
  74. 'size' => 'sm',
  75. 'color' => '#999999',
  76. 'margin' => 'md',
  77. 'flex' => 0,
  78. ),
  79. ),
  80. ),
  81. 2 =>
  82. array (
  83. 'type' => 'box',
  84. 'layout' => 'vertical',
  85. 'margin' => 'lg',
  86. 'spacing' => 'sm',
  87. 'contents' =>
  88. array (
  89. 0 =>
  90. array (
  91. 'type' => 'box',
  92. 'layout' => 'baseline',
  93. 'spacing' => 'sm',
  94. 'contents' =>
  95. array (
  96. 0 =>
  97. array (
  98. 'type' => 'text',
  99. 'text' => 'Place',
  100. 'color' => '#aaaaaa',
  101. 'size' => 'sm',
  102. 'flex' => 1,
  103. ),
  104. 1 =>
  105. array (
  106. 'type' => 'text',
  107. 'text' => 'Miraina Tower, 4-1-6 Shinjuku, Tokyo',
  108. 'wrap' => true,
  109. 'color' => '#666666',
  110. 'size' => 'sm',
  111. 'flex' => 5,
  112. ),
  113. ),
  114. ),
  115. 1 =>
  116. array (
  117. 'type' => 'box',
  118. 'layout' => 'baseline',
  119. 'spacing' => 'sm',
  120. 'contents' =>
  121. array (
  122. 0 =>
  123. array (
  124. 'type' => 'text',
  125. 'text' => 'Time',
  126. 'color' => '#aaaaaa',
  127. 'size' => 'sm',
  128. 'flex' => 1,
  129. ),
  130. 1 =>
  131. array (
  132. 'type' => 'text',
  133. 'text' => '10:00 - 23:00',
  134. 'wrap' => true,
  135. 'color' => '#666666',
  136. 'size' => 'sm',
  137. 'flex' => 5,
  138. ),
  139. ),
  140. ),
  141. ),
  142. ),
  143. ),
  144. ),
  145. 'footer' =>
  146. array (
  147. 'type' => 'box',
  148. 'layout' => 'vertical',
  149. 'spacing' => 'sm',
  150. 'contents' =>
  151. array (
  152. 0 =>
  153. array (
  154. 'type' => 'button',
  155. 'style' => 'link',
  156. 'height' => 'sm',
  157. 'action' =>
  158. array (
  159. 'type' => 'uri',
  160. 'label' => 'CALL',
  161. 'uri' => 'https://linecorp.com',
  162. ),
  163. ),
  164. 1 =>
  165. array (
  166. 'type' => 'button',
  167. 'style' => 'link',
  168. 'height' => 'sm',
  169. 'action' =>
  170. array (
  171. 'type' => 'uri',
  172. 'label' => 'WEBSITE',
  173. 'uri' => 'https://linecorp.com',
  174. ),
  175. ),
  176. 2 =>
  177. array (
  178. 'type' => 'spacer',
  179. 'size' => 'sm',
  180. ),
  181. ),
  182. 'flex' => 0,
  183. ),
  184. )
  185. );
  186. $client->pushMessage($push);
  187. exit;
  188.  
  189.  
  190. }
RAW Paste Data