Open H1l4nd0r opened 3 years ago
What version of php do you use? Looks like php < 5.6 did not support reading from php://input
multiple times.
Try to remove IngineTools::logIt('bot', print_r($_REQUEST,true) . file_get_contents('php://input'));
line
I'm making requests from local machine to bot web hook
Request data {"update_id":49608015, "message":{"message_id":344,"from":{"id":118265506,"is_bot":false,"first_name":"ChEl","username":"h1l4nd0r","language_code":"ru"},"chat":{"id":118265506,"first_name":"ChEl","username":"h1l4nd0r","type":"private"},"date":1612448172,"text":"kkjlk"}}
and Here is my code
header('Content-Type: text/json; charset=utf-8'); require DIR . '/config.php';
and in response I get Syntax Error and trace
Array ( [0] => Array ( [file] => /siteroot/vendor/telegram-bot/api/src/Client.php [line] => 134 [function] => jsonValidate [class] => TelegramBot\Api\BotApi [type] => :: [args] => Array ( [0] => [1] => 1 )
)