Answer the question
In order to leave comments, you need to log in
How to make different pictures each time on one request in callback api?
How can I make the bot send a different picture each time in the community messages when the request is the same?
That is, prescribe a lot of different pictures and each time gave a random one.
The code:
}elseif (strpos($user_msg, 'girl') !== false) {
$v->msgsend("Держи тяночку", $uid, $token, "photo-153335667_456239040");
Answer the question
In order to leave comments, you need to log in
$images = ['photo1', 'photo2', 'photo3', 'photo4']
$image = $images[array_rand($images)]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question