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 2 2009, 09:30 PM
Post
#2
|
|
|
the name's mario ![]() ![]() ![]() ![]() ![]() ![]() Group: Official Member Posts: 1,270 Joined: Jun 2008 Member No: 656,520 |
try to play with the script in this tutorial
|
|
|
|
Jul 2 2009, 09:34 PM
Post
#3
|
|
![]() Member ![]() ![]() Group: Member Posts: 27 Joined: Sep 2008 Member No: 685,562 |
Thanks, I will!
|
|
|
|
Jul 2 2009, 09:35 PM
Post
#4
|
|
|
the name's mario ![]() ![]() ![]() ![]() ![]() ![]() Group: Official Member Posts: 1,270 Joined: Jun 2008 Member No: 656,520 |
forgot to tell you that the script is for ads, so just try to remove the url line and see if it works
|
|
|
|
Jul 3 2009, 07:22 AM
Post
#5
|
|
![]() 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. |
|
|
|
Jul 12 2009, 04:30 PM
Post
#6
|
|
![]() Member ![]() ![]() Group: Member Posts: 27 Joined: Sep 2008 Member No: 685,562 |
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. I'll try this. Thank you! |
|
|
|
Jul 12 2009, 04:59 PM
Post
#7
|
|
![]() Senior Member ![]() ![]() ![]() Group: Member Posts: 74 Joined: Jul 2009 Member No: 735,738 |
Hermes, I LOVE your icon!
|
|
|
|
Jul 12 2009, 06:23 PM
Post
#8
|
|
|
Senior Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Staff Alumni Posts: 4,665 Joined: Aug 2008 Member No: 676,364 |
QUOTE(PaigeTurner) Hermes, I LOVE your icon! this. |
|
|
|
Jul 12 2009, 06:45 PM
Post
#9
|
|
![]() Mel Blanc was allergic to carrots. ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Official Designer Posts: 6,371 Joined: Aug 2008 Member No: 676,291 |
uh, this should be closed.
it just got irrelevant. >_> |
|
|
|
Jul 13 2009, 06:31 AM
Post
#10
|
|
|
Treasure Pleasure ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Head Staff Posts: 11,193 Joined: Oct 2005 Member No: 281,127 |
PM me if you need this reopened. Topic closed & moved.
|
|
|
|
![]() ![]() |