1
我嘗試在telgram webhook的php文件中使用cookie,但不工作!
我的代碼是:如何在電報中使用cookie Bot和php?
$cookie_name = "tlgrm_command";
$cookie_value = "code";
setcookie($cookie_name, $cookie_value, time() + (86400*2), "/"); // 86400 = 1 day
但$_COOKIE[$cookie_name]
是null
!
這很可能是因爲在首先使用cookie在_webhook_方案中沒有意義。 – CBroe
如何在電報bot api中存儲變量? –
謝謝@CBore。如何在webhook中使用會話存儲變量? –