جناب الان دو صفحه بالا رو به این شکل تغییر دادم ولی کار نمیکنه مشکلش کجاس ؟
صفحه اول source.php
define('api','https://api.telegram.org/bot'.token.'/');
$data= file_get_contents("php://input");
$update=json_decode($data,true);
$message=$update["message"];
$text= $message["text"];
$cid= $update["message"]["from"]["id"];
$from = $message["from"];
$username = $from["username"];
$nome = $from["first_name"];
$cognome = $from["last_name"];
function apiRequest($metodo){
$reg = file_get_contents(api.$metodo);
return $reg ;
}
function send ($id , $text){
if(strpos($text, "\n")){
$text=urlencode($text);
}
return apiRequest("sendmessage?text=$text&parse_node=HTML &chat_id=$id");
}
function keyboard($tasti , $text , $cd){
$tasti2 = $tasti;
$tasti3 = json_encode($tasti2);
if(strpos($text, "\n")){
$text=urlencode($text);
}
apiRequest("sendmessage?text=$text&parse_node=mark down&chat_id=$cd&reply_markup=$tasti3");
}
صفحه دوم bot.php
define('token','441686265:AAEJOH3PHk9LpqDXN5bGqVDA aAbz1k1YQKo');
include 'source.php' ;
if ($text == "/start"){
$keyboard=[
["dfadfa","adfdffd"],
["ddddda","addfgsfgfd"],
];
$key=array(
"resize_keyboard" => true ,
"keyboard" => $keyboard ,
);
keyboard($key , "jggggkkgjk" ,$cid);
}
به اصطلاح کلید گذاشتم براش با یه متن ولی ربات کار نمیکنه جایی هم ویرایشگر ارور نگرفته