Eleirbag89 / TelegramBotPHP

A very simple PHP Telegram Bot API for sending messages.
http://eleirbag89.github.io/TelegramBotPHP
MIT License
800 stars 340 forks source link

How to send an Html file to a user #247

Closed mhmmdq closed 3 years ago

mhmmdq commented 3 years ago

Hi. Is it possible for the robot to send the Html file to the user? If yes I could not send the Html file using sendDocument, thank you for your help

gbenisty commented 1 year ago

Did you find a solution ?

mhmmdq commented 1 year ago

hi yes

$content = ['chat_id' => $chat_id, 'document' => new CURLFile("file.html"), 'caption'=>$caption , 'reply_markup'=>$keyboard]; $telegram->sendDocument($content);