Answer the question
In order to leave comments, you need to log in
How to pass a new line to the text parameter in the link to the API?
$text_s = "Смс 1\nСмс 2";
$text = str_replace(' ', '%20', $text_s);
$use_me = file_get_contents("https://api.vk.com/method/messages.send?peer_id={peer}&message={$text}&v=5.85&access_token={$ktoken}");
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question