I need to send a long message to a telegram group with a bot. The message comes from a wordpress site after placing an order,I need to send all raw data an order creates to the telegram. The bot and php code works so far, it is sending me the message if I type something basic, but when I put the order information it doesn´t send any message. I am looking for some code that somehow parses this information and makes it url ready to send to telegram.
This is my code:
* SEND ORDER TO TELEGRAM GROUP
*/
$apiToken = "Token";
$data = [
'chat_id' => 'ChatId',
'text' => 'New Order, Open App'
];
$response = file_get_contents("https://api.telegram.org/bot$apiToken/sendMessage?" .http_build_query($data) );
/**
* SEND ORDER TO TELEGRAM GROUP
*/
Maybe someone did it already previously? Thanks.