this is a simple script to select images randomly from the folder you set, you can use it on your blog background, or your personal site, or anything you like =v=
just put all the files into your web folder (make sure you have PHP environment installed), then you can add your favorite images into imgs
folder if you didn't change the default config.
the default image folder is named as imgs
if you want to configure the default seeting, please refer to config.inc.php
to modifiy your seetings.
- IMG_DIR - the relative path for your images folder from your web server.
- IMG_EXTENSIONS - the supported image file extension for your images.
- IMG_NO_REPEAT_CURRENT - if set to
true
the next randomly selected image won't be same to the currently selected image, if set tofalse
will ignore the currently selected image for next random select (so the repetitive selected image may occur).
you can directly call index.php
to fetch the image, e.g. if this script is in your root web folder www/Random-image/
then you can access image via the url http://[your-ip]/Random-image
.