Trying to execute the request through the script with the Atom feed:
foreach($xml->channel->item as $item) { global $chatID; $description = $item->description; $description = html_entity_decode($description); $description = strip_tags($description); var_dump($description); $sendto = API_URL."sendmessage?chat_id=".$chatID."&text=".$description; file_get_contents($sendto); } Issues 400 Bad Request: PHP Warning: file_get_contents("текст запроса") . I take the request text from the terminal, copy it to the browser’s address bar, the request is executed, the message arrives, but all Cyrillic characters are replaced with codes of the form: \u041f\u0440\u0438\u0432 and so on. I understand this is a problem with the encoding, I tried these solutions:
//$description = mb_convert_encoding($description, 'utf-8', 'utf-8'); //$description = mb_convert_encoding($description,'CP1250','Unicode'); //$description = mb_convert_encoding($description, "UTF-8", "auto");Тол Zero sense. Who faced a similar, tell me how to solve this problem?