V
V
Viplayer2019-12-02 00:24:42
PHP
Viplayer, 2019-12-02 00:24:42

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 question

Ask a Question

731 491 924 answers to any question