Category : php-telegram-bot

I have a Telegram bot written in PHP. It sends large list of person details. My problem is that I cant send all data. $input = file_get_contents(‘php://input’); $update = json_decode($input); $message = $update->message; $chat_id = $message->chat->id; $file = file_get_contents(‘a_very_long_lidt.txt’); //this is the file i want to send $token = ‘TOKEN’; file_get_contents("https://api.telegram.org/bot$token/sendMessage?chat_id=$chat_id&text=$file"); //sending the whole file ..

Read more

Hi guys I’ll explain my code: I have a telegram bot and I have to write many messages quickly in a group and to write a message it is necessary to execute a link (using the Telegram Api). To do this I use Curl: curl_setopt($ch, CURLOPT_URL, $url_telegram); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_VERBOSE, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, ..

Read more