บทความ

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"