Last active
August 22, 2016 19:32
-
-
Save itskenny0/b87f251c8e2da53b2b8f88baf5424759 to your computer and use it in GitHub Desktop.
Possibly the tiniest 'Hello World' webhook bot you can write in PHP without any libraries.
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 | |
$chat = json_decode(file_get_contents("php://input"))->message->chat->id; | |
header("Content-Type: application/json"); | |
echo json_encode(array("method" => "sendMessage", "text" => "Hello World", "chat_id" => $chat)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment