check webhook

This commit is contained in:
mercury
2024-03-02 15:05:21 +04:00
parent f360091c1a
commit cdcd6a7931
2 changed files with 7 additions and 2 deletions
+6 -1
View File
@@ -4065,10 +4065,15 @@ DNS-over-HTTPS with IP:
die('нет айпи');
}
echo "$ip\n";
var_dump($this->request('setWebhook', [
var_dump($r = $this->request('setWebhook', [
'url' => "https://$ip/tlgrm?k={$this->key}",
'certificate' => curl_file_create('/certs/self_public'),
]));
if (!empty($r['result']) && $r['result'] == true) {
file_put_contents('/start', 1);
} else {
die('set webhook fail');
}
}
public function setcommands()