![]() If you follow step by step its will work. Set Your Webhook from this bot choose command or type ' ست وب هوک '.This is the answer for all of your problems.įollow this step after you got a secret token for your bot: My question how can I use php://input to execute my script automatically? The script is on a server from "one.com" and the certificate is also from "one.com". The tutorial said that $update = file_get_contents('php://input') is the right way, to be used before $update = file_get_contents($website."/getupdates"). However when I use the webhook it doesn't work anymore. The script worked if I execute the script manually. $text = $updatearray įile_get_contents($website."/sendmessage?chat_id=".$chatid."&text=hello") įile_get_contents($website."/sendmessage?chat_id=".$chatid."&text=bye") At first, our bot will simply echo back any message we send it, but then we'll extend it to add a database and persist information across chat sessions. In this tutorial, we'll walk through building a simple Telegram Bot using Python. $updatearray = json_decode($update, TRUE) One of these, which is arguably the simplest to use and is also growing steadily in popularity, is Telegram. $update = file_get_contents('php://input') I used the code from the tutorial as a template:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |