Receive latest coronavirus statistics in Morocco
git clone https://github.com/NAYCHO334/CovidMaroc-Telegram-Bot.git
Use composer to install packages
cd CovidMaroc-Telegram-Bot
composer update
There's a… bot for that. Just talk to BotFather and follow a few simple steps. Once you've created a bot and received your authorization token.
Copy Token and paste it in:
/index.php [line 30]
/updater.php [line 37]
Copy the project to a server. for example: https://example.com/project/
Now you have to register your project's index.php page to telegram bot to redirect requests to your server.
Change with your token, and project URL, then open the URL in a new page.
https://api.telegram.org/bot<token>/setWebhook?url=https://example.com/project/index.php
A result will return like this:
"ok": true,
"result": true,
"description": "Webhook *******"
}
Please Note: All queries to the Telegram Bot API must be served over HTTPS and need to be presented in this form: https://api.telegram.org/bot/METHOD_NAME. See Documentation
To check new updates continuously just declare https://example.com/project/updater.php
in your server's cron job.
If there's an update, a message will be sent to all subscribed users.
When https://www.covidmaroc.ma/
owners want to update data, they change dom also 🤣 so that may cause an error in the program 😕