dilab

dilab does not currently provide support for this item.

7 comments found.

Hello,

I cannot get this to work. I uploaded the random_image folder to my httpd folder and i have created a folder within httpd called image. I created a test image and placed it in there.

in my html i have the following showing in the code.

<?php include ‘random_image/random_image.php’; $randomImage = new RandomImage(); ?> show();?>” />

When i view my page, the image does not show at all. What am i doing wrong? I was really hoping this would work!

$randomImage->show(); this function will show you a random image URL ,

you need to use
<img src="<?php  echo $randomImage->show();?>" />

to show an image.

Does this script make your images rotate like a slideshow – one after the other in random order? If so, can you change the speed and other variables on the slide show?

Or does it simply show one random image and the image changes on pageload/refresh?

Thank you! Susan

Hi Susan

This class is a server side solution, it gives you a random image from a specific folder. for slideshow stuff, you will have to do it using front end solution.

Hi is it possible to load one image every 15 minutes or every hour ?

Maybe I did not understand your question clearly.

But this is a server side class. loading image is something you do in the front side.

hi is there any demo??

Hi

You can read the documentation. It is hard to provide demo for a Class file.

Regards XD

Hi, question before I buy. How would this work if background is defined within style.css? Or does background have to be defined in the html file in order to use this?

Hi

This is a PHP class, which returns your random image, it has nothing to do with the front end.

Regards XD

Hi,

Great Little Class!!!

i’m trying to load RandomImage from a static url (subdomain).

e.g.

<?php
include 'random_image/random_image.php';
$randomImage = new RandomImage();
$randomImage->setFolder(http://staticdomain.com/image);
?>
<img src="<?php  echo $randomImage->show();?>" />

Could you please show my how,

Regards :)

Hi.

Thanks.

You have got the basic idea of how it works. But it does not work on URL structure. You will have to use local folder path. Hence you need to upload the class to your server and access the image folder via folder structure.

Regards XD

The demo link is not a demo. It’s a help file.

Want to see if this can act as slide show of images taken from a folder.

Thanks

Hi

As the lib is a PHP code piece, the help file should be able to explain how it works.

Yes, you can use it to extract image from a folder and display it as a slide show. However you need to make sure you have a slide show lib available.

Regards Xu

by
by
by
by
by
by