File manager - Edit - /home/autoph/public_html/api/bot/checkbotuser.php
Back
<?php include '../../../cfg/ahaconn.php'; $mykey = $_GET['mKey']; if($mykey =="6e59e008b5348b452b615a3033729daae383"){ $FName = ''; $ifFount = 0; $convoID = ''; $botUserID = $_GET['botUserID']; $sql = "SELECT * FROM `bot_chat` WHERE `bot_user_id`='$botUserID' AND `deleted` = 0 LIMIT 1"; $result = $conn->query($sql); if ($result->num_rows > 0) { $rows = array(); while($row = $result->fetch_assoc()) { //$rows[] = $row; $FName = $row['guest_name']; $convoID = $row['chat_id']; } $ifFount = "1"; } else { $ifFount = "0"; } header('Content-Type: application/json'); echo json_encode(["status"=>$ifFount,"FName"=>$FName,"convoID"=>$convoID]); } //https://autohub.ph/api/bot/checkbotuser.php?mKey=get59e008b5348b452b615a3033729ID&&botUserID={{event.userId}}&convoID = {{event.conversationId}}&FName = {{workflow.FName}} //Update guest Interest if($mykey =="get59e008b5348b452b615a3033729ID"){ $chatID =$_GET['convoID']; $botUserID =$_GET['botUserID']; $FName =$_GET['FName']; $source =$_GET['compCode']; $sql = "INSERT INTO bot_chat (`id`,`chat_id`,`guest_name`,`bot_user_id`,`source`) VALUES ('','$chatID','$FName','$botUserID','$source')"; if ($conn->query($sql) === TRUE) { $stat='success'; } else{ $stat='error'; } header('Content-Type: application/json'); echo json_encode(["status" =>$stat]); } $conn->close(); ?>
| ver. 1.4 |
.
| PHP 8.1.32 | Generation time: 0 |
proxy
|
phpinfo
|
Settings