Title: sending a random image
Last modified: August 31, 2016

---

# sending a random image

 *  [kopaev](https://wordpress.org/support/users/kopaev/)
 * (@kopaev)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/sending-a-random-image/)
 * Show you how to send a random image from a directory on request or on the hashtag
   instagramm
    Example: When you click on “Send a picture” bot sends a random picture
   Is there any sample code php?
 * [https://wordpress.org/plugins/telegram-bot/](https://wordpress.org/plugins/telegram-bot/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Marco Milesi](https://wordpress.org/support/users/milmor/)
 * (@milmor)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/sending-a-random-image/#post-7258100)
 * > how to setup dynamic answer to mybot message
 * [wordpress.org/support/topic/how-to-setup-dynamic-answer-to-mybot-message](https://wordpress.org/support/topic/how-to-setup-dynamic-answer-to-mybot-message?replies=4)
 * The plugin function is
    `telegram_sendphoto($chat_id, $caption, $photourl)`
 * PHP offers different ways like rand() to randomize things.
 *  Thread Starter [kopaev](https://wordpress.org/support/users/kopaev/)
 * (@kopaev)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/sending-a-random-image/#post-7258101)
 * And whether there is a code sample for [insert php]
    Pictures are located at /
   wp-content / uploads / img / How to make so that they send randomly when prompted?
 *  Plugin Author [Marco Milesi](https://wordpress.org/support/users/milmor/)
 * (@milmor)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/sending-a-random-image/#post-7258454)
 * You can name photos like 0.jpg, 1.jpg,… and use the previous commands. Some php
   knowledge is required

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘sending a random image’ is closed to new replies.

 * ![](https://ps.w.org/telegram-bot/assets/icon-256x256.png?rev=2981438)
 * [Telegram Bot & Channel](https://wordpress.org/plugins/telegram-bot/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/telegram-bot/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/telegram-bot/)
 * [Active Topics](https://wordpress.org/support/plugin/telegram-bot/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/telegram-bot/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/telegram-bot/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Marco Milesi](https://wordpress.org/support/users/milmor/)
 * Last activity: [10 years, 1 month ago](https://wordpress.org/support/topic/sending-a-random-image/#post-7258454)
 * Status: not resolved