2022-05-13 17:02:22
$megakoders = $update->message;
$tx = $megakoders->text;
$cid = $megakoders->chat->id;
if ($tx == "/news"){
$url = "https://daryo.uz/feed/";
$rss = simplexml_load_file($url);
foreach ($rss->channel->item as $item) {
$line = $item->title;
$link = $item->link;
}
bot ('sendmessage', [
'chat_id'=> $cid,
'text'=>" [$line]($link)",
'parse_mode' =>"markdown",
]);
}
Yangiliklarni aytadi bot uchun
756 viewsRozimuhammad, 14:02