-
-
Save andreafortuna/47e1c33a121bb3997aa66c868511f767 to your computer and use it in GitHub Desktop.
Simple Telegram Echo Bot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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