บทความ

กำลังแสดงโพสต์จาก 2019

line beacon arduino ide

การหา line beacon hw id https://admin-official.line.me/beacon/ ///////////////////////////////////////////////////////////////////// #include "bt.h" #include "esp_gap_ble_api.h" static const uint8_t HWID[5] = {0x01, 0x1a, 0xa6, 0xf1, 0x09};  // LINE 011aa6f109 static const uint8_t ADC_PIN = 35; static const float R1 = 4000.0; static const float R2 = 2000.0; static const uint16_t UUID_FOR_LINECORP = 0xFE6F; static const uint8_t  MAX_SIMPLEBEACON_DEVICEMESSAGE_SIZE = 13; static uint8_t deviceMessageSize = 1; static uint8_t deviceMessage[MAX_SIMPLEBEACON_DEVICEMESSAGE_SIZE]; static const uint8_t  MAX_BLE_ADVERTISING_DATA_SIZE = 31; static const uint16_t HCI_LE_Set_Advertising_Data   = (0x08 << 10) | 0x0008; static const uint16_t HCI_LE_Set_Advertising_Enable = (0x08 << 10) | 0x000A; static void _dump(const char * title, uint8_t *data, size_t dataSize) {   Serial.printf("%s [%d]:", title, dataSize);   for (size_t i = 0;

webhook line beacon example

<?php header('Content-Type: application/json'); date_default_timezone_set("Asia/Bangkok"); $datef = date('Y-m-d'); $json = file_get_contents('php://input'); $request = json_decode($json, true); $userId = $request['events'][0]['source']['userId']; $Type = $request['events'][0]['beacon']['type']; $a ="\n\r\n userid = ".$userId; $b ="\n\r\n Type = ".$Type; $myfile = fopen("log$datef.txt", "w") or die("Unable to open file!"); fwrite($myfile,$json); fwrite($myfile,$a); fwrite($myfile,$b); fclose($myfile); if($Type ='enter'){ $curl = curl_init(); curl_setopt_array($curl, array(   CURLOPT_URL => "https://api.line.me/v2/bot/message/push",   CURLOPT_RETURNTRANSFER => true,   CURLOPT_ENCODING => "",   CURLOPT_MAXREDIRS => 10,   CURLOPT_TIMEOUT => 30,   CURLOPT_HTTP_VERSION => CURL_HTT

train

รูปภาพ
https://notify-bot.line.me/ PDEFAULT * ___NOTIFY___ $msdfsfsdfsdfsdfsEGPCDS8m1Xnnenpkf5,รอสักครู่เรากำลังหาข้อมุล,พิมพ์มาว่า * ___THSTOCK___ $*

การประยุกต์ใช้ Line notify ในกรณี user พิมพ์มาไม่ตรงกับ intent ใดๆ ใน Abdul

รูปภาพ
test https://localhost/noti.php?token=line_notify_token&user_id=U12fddaf8f57c6685b2b7120e23328e71&img=https://localshost/img/verygood.png &message=test //////////////// php /////////////// <?php $user_id = $_REQUEST['user_id']; $token = $_REQUEST['token']; $message = $_REQUEST['message']; $pic = $_REQUEST['img']; $text = 'From '.$user_id.' '.$message; echo "___SILENT___"; $chOne = curl_init(); curl_setopt( $chOne, CURLOPT_URL, "https://notify-api.line.me/api/notify"); // SSL USE curl_setopt( $chOne, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt( $chOne, CURLOPT_SSL_VERIFYPEER, 0); //POST curl_setopt( $chOne, CURLOPT_POST, 1); // Message curl_setopt( $chOne, CURLOPT_POSTFIELDS, $message); //ถ้าต้องการใส่รุป ให้ใส่ 2 parameter imageThumbnail และimageFullsize curl_setopt( $chOne, CURLOPT_POSTFIELDS, &qu

การ push กลับหา user

    <!DOCTYPE html>     <html>     <head>         <title></title> <style> body {     background: #ccc; } input[type=text] {   width: 218px; } input[type=submit] {   background: #000;   color: #fff; } input[type=submit], input[type=text] { padding: 9px; font-size: 18px; line-height: 18px; float: left; border: 0; display: block; margin: 0; } </style>     </head>     <body> <br> <table align="center"> <tr align="center"> <td align="center">         <form action="" method="post" align="center">            <input type="text" name="msg"><br><br>             <input type="submit" name="SubmitButton">         </form> </td> </tr> </table> <!-- <form action="#" method="post"> <

การใช้ abdul ดึงข้อมูลจาก mysql ด้วย PHP มาแสดงใน Line chatbot โดยใช้ XJSON

รูปภาพ
Abdul result  Line chatbot Mysql create table person id ( int auto increament) titleNameTHFULL(varchar) nameTh(varchar) surname (varchar) DeparmentName(varchar) groupname(varchar) phonenumber(varchar) php ///////////  connections.php ////// <?php $Setup_Server = 'host'; $Setup_User = 'user_db'; $Setup_Pwd = ''password_db"; $Setup_Database = 'name_db'; mysql_connect($Setup_Server,$Setup_User,$Setup_Pwd); mysql_query("use $Setup_Database"); mysql_query("SET NAMES UTF8"); ?> ///////////////// <?php header('Access-Control-Allow-Origin: *'); header('Access-Control-Allow-Methods: GET, POST');   include('connections.php'); $name = $_REQUEST['name']; $sql = "SELECT  * from  person where name   LIKE '%".$name."%'  "; $resource = mysql_query($sql); $count_row = mysql_num_

example

XREM KEY : * ANS :___XTEXT___ $ https://apiurl?q=###KEY###&userid=###LINEUSERID### https://medium.com/linedevth/%E0%B8%89%E0%B8%B5%E0%B8%81%E0%B8%81%E0%B8%8E%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B9%81%E0%B8%AA%E0%B8%94%E0%B8%87%E0%B8%9C%E0%B8%A5%E0%B8%82%E0%B9%89%E0%B8%AD%E0%B8%84%E0%B8%A7%E0%B8%B2%E0%B8%A1%E0%B9%81%E0%B8%9A%E0%B8%9A%E0%B9%80%E0%B8%94%E0%B8%B4%E0%B8%A1%E0%B9%86%E0%B9%83%E0%B8%99-line-messaging-api-%E0%B8%94%E0%B9%89%E0%B8%A7%E0%B8%A2-flex-message-4ad4370562f 1---------------------  เมนูรวม {   "type": "carousel",   "contents": [     {       "type": "bubble",       "styles": {         "footer": {           "backgroundColor": "#04B45F"         }       },       "header": {         "type": "box",         "layout": "horizontal",         "contents": [           {             "type": "box"

การอบรม การสร้างระบบสนทนาอัจฉริยะ (Chatbot) บนแอปพลิเคชั่นไลน์

รูปภาพ
DAY 2 https://admin-official.line.me/ line://nv/location line://nv/camera/ USER_SHARE_IMAGE ___XTEXT___ ###SHAREDIMAGE### USER_SHARE_LOCATION  ___THAIAQI___ $###USERLOCATION### ขั้นตอนการทำ https://modcumram.com/linebot/botdata/Uefe32db4208e1cc38100e1b93ced491e//2019-03-25/2019-03-25-110332.jpg https://admin-official.line.me/14423193/contents/hash/eo%252BqhLhlshU8WjKr3%252Fl9zSm%252F3neyy1RFUzHujODK2W3Y2E71U5Gw9wqYKMvvKgYC%252BU%252F30FSj%252BITUy3vJ4RjSwZ%252F1DzRIt4PzJzjNeBghck%252BtLxyUSsWSok2Mqg2fpx1k%252FhO206bocHpgTXbz5e%252BP%252FLktk1B32pM21Xu5W3f5Hm7mrZ5E4iMqn3VjdGwlDD7s75l2Z304CCuq1rAHtGG9dACWr%252F62ZLKAKMNVHS%252FvkMWMdx5XowkthPHRYKZmnXZSnp4u73MIv6cbEVKHCZcufvGnsYev1gSRnNpfIt4sBqc%253D.jpg 1. https://developers.line.biz/ คู่มือ  https://abdul.in.th/dl/ABDUL-Platform-Mannaul-v2.pdf 2. https://abdul.in.th/abdul วันพระ คำถาม   วันพระ ___IMG___ https://modcumram.com/liff/monk03.jpg วันรับเงินเดือน ___IMG___ https://modcumram.com/linebo

PM2.5 อาคารกษาปณ์ ถนนประดิพัทธ์

การทำ line liff เบื้องต้น

1.สร้างไฟล์  html 2.ดาวน์โหลด lineliff.js มาใส่ใน folder เดียวกัน  https://github.com/line/line-liff-starter.git 3.เพิ่ม code แทรกไป  <script src="https://d.line-scdn.net/liff/1.0/sdk.js"></script>     <script src="liff-starter.js"></script> 4.เข้าไป line developer เลือก chatbot เลือก  menu liff

การทำ line quick reply

doc   https://developers.line.me/en/docs/messaging-api/using-quick-reply/ ------------------ for postman -------------------------- {     "to":"C20ac4ddc58f3fcb24c69da0a4dc4916d",    "messages": [ {   "type": "text",   "text": "สนใจข้อมูลใดบ้างครับ",   "quickReply": {     "items": [       {         "type": "action",         "imageUrl": "https://f.ptcdn.info/716/040/000/o3npyu1b2ovxUqEPxDb-o.jpg",         "action": {           "type": "message",           "label": "วันรับเงินเดือน",           "text": "วันรับเงินเดือน"         }       },       {         "type": "action",         "imageUrl": "https://f.ptcdn.info/716/040/000/o3npyu1b2ovxUqEPxDb-o.jpg",         "action": {           "type": "message&q