Eleirbag89 / TelegramBotPHP

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

send message error 500 #155

Closed jrischma closed 4 years ago

jrischma commented 6 years ago

Hi, i have into same folder Telegram.php and test.php

test.php has:

include 'Telegram.php'; $bot_token = 'MY_TOKEN_BOT'; $telegram = new Telegram($bot_token); $chat_id = $telegram->ChatID(); $content = array('chat_id' => $chat_id, 'text' => 'Test'); $telegram->sendMessage($content);

http://my_ip/test.php return "HTTP ERROR 500"

what is wrong?

thanks!!

Eleirbag89 commented 6 years ago

you shuold not visit your script url, but set a webhook and let Telegram contact it