Random Image Everytime You Refresh |
Random Image Everytime You Refresh |
Jul 2 2009, 09:24 PM
Post
#1
|
|
![]() Member ![]() ![]() Group: Member Posts: 27 Joined: Sep 2008 Member No: 685,562 |
I have a Piczo website and I wish to place a html code for displaying random images everytime I refresh my page. How do you do this?
|
|
|
|
![]() |
Jul 3 2009, 07:22 AM
Post
#2
|
|
![]() Offline. ![]() ![]() ![]() ![]() ![]() Group: Official Designer Posts: 609 Joined: Mar 2007 Member No: 507,591 |
If you don't want to use javascript for that you can use php which is better.
Here is the simpliest way that I could thing ok. Must be a .PHP File CODE <?php // linking to the images that you want to display. // feel free to edit within the single quotes '' $images = array( 'http://farm1.static.flickr.com/175/428230889_3b3994a0b9_m.jpg', 'http://farm2.static.flickr.com/1371/1008816651_22d46ee2d1_m.jpg', 'http://farm4.static.flickr.com/3121/2765637403_268188b4a7_m.jpg', 'http://farm4.static.flickr.com/3008/2611822886_ee757ee4ed_m.jpg', 'http://farm1.static.flickr.com/1/2998240_18286b2677_m.jpg' ); // printing out the image. echo "<img src=\"" . $images[array_rand($images)] . "\" alt=\"\" />"; ?> You can add as many images as you want. Make sure you add the comma , after all except the last one. Edit: I don't no if Piczo allow php. |
|
|
|
Keeper-Of-Keys Random Image Everytime You Refresh Jul 2 2009, 09:24 PM
hermes try to play with the script in this tutorial Jul 2 2009, 09:30 PM
Keeper-Of-Keys Thanks, I will! Jul 2 2009, 09:34 PM
hermes forgot to tell you that the script is for ads, so ... Jul 2 2009, 09:35 PM
Keeper-Of-Keys QUOTE(Fawaz @ Jul 3 2009, 08:22 AM) If yo... Jul 12 2009, 04:30 PM
PaigeTurner Hermes, I LOVE your icon! Jul 12 2009, 04:59 PM
Beenly QUOTE(PaigeTurner)Hermes, I LOVE your icon! ... Jul 12 2009, 06:23 PM
Mikeplyts uh, this should be closed.
it just got irreleva... Jul 12 2009, 06:45 PM
Mike PM me if you need this reopened. Topic closed ... Jul 13 2009, 06:31 AM![]() ![]() |