I'm working with PHP to manage my Telegram Bot. Basically Telegram had added a feature which can lets users to get updates from their bots within this url:
https://api.telegram.org/bot[TOKEN_NUMBER]
Now I want to know, the bot that I'm going to search for, does exist or not.
So whenever you type the wrong Token Number of the bot, the API page returns this:
{"ok":false,"error_code":401,"description":"Unauthorized"}
And if exists the page returns this instead:
{"ok":true,"result":[]}
As you can see I have to get contents of a this page and determine some variables in order to know the existence of a bot. So, how can I do that with PHP ?