Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Simple Telegram Echo Bot
<?php
call_user_func(function($hookObj){file_get_contents("https://api.telegram.org/bot<YOURTOKEN>/sendMessage?chat_id=" .$hookObj["message"]["chat"]["id"] . "&text=" . urlencode($hookObj['message']['text']));},json_decode(file_get_contents("php://input"), true));
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment