how to check if the webhook url is valid?
Call this by GET :
https://api.telegram.org/bot
with getWebhookInfo only catch the info of the updates recibed, don't catch the info of the server side. For example, if I put this:
$bot->setWebhook(['url'=>'https://google.es/']);
the response of the server's Telegram said Ok : true
Then @hellosaeedalizadeh , when you do these :
$response=$bot->getWebhookInfo();
The $response contains info about the status of the webhook, but havn't a parameter wich contains info about if the domain exist or is accesible.
It can solve with a response from the server selected (for example to confirm that it's the server of your bot, if it recives a $_POST['Telegram'] , your server should response with the token of your bot to confirm that is your server)
Most helpful comment
Call this by GET :
https://api.telegram.org/bot/getWebhookInfo