I want make input message in telegram bot using php language I want something like :
When bot say "send your code" The user send something like "AC6J7A" How I can get the code I mean how to make message handler .
<?php
$token = 'XXXX';
define('API_KEY',$token);
function bot($method,$datas=[]){
$url = "https://api.telegram.org/bot".API_KEY."/".$method;
$datas = http_build_query($datas);
$res = file_get_contents($url.'?'.$datas);
return json_decode($res);
}
bot('sendMessage',[
'chat_id' => $chat_id,
'text' => 'Send Your Code : ']);
?>
How can I get the next message of user or can i make message handler ?