snubbr.com

Important Computer Queston..Whats a Verisign SSL?

Get a Verisign SSL certificate for 30 days FREE. Click here to use coupon...

Get a free trial of Verisign SSL certificates. Click here for this special deal...
First question I got is Important Computer Queston..Whats a Verisign SSL? Hoping for any answer or 2. My other question... Verisign site Style - Black.

Gif pictures - 5x5px white.

What I want to do:.

Take.

Gflash01.gif.

Gflash02.gif.

Gflash03.gif.

....

Gflash10.gif.

Then line up 10 pics next to each other with a 5px space between them and make the Verisign website dispay them in a random order..

They are white flash/fading gifs with the same name but different flash/fade times..

My goal is to create a random patter emerging for each person who visits my site..

Think of it as a footer on a music composing Verisign website that helps people composing songs to get ideas from emerging patterns...

Comments (68)

Hmm... I need to find out myself. I don't know what is the answer. I'll do some poking around and get back to you if I find an answer. You should email the people at Verisign as they probably know..

Comment #1

<?php.

Foreach (glob("gflash*.gif") as $filename) {.

Echo '<img border="0" src="', $filename, '" />';.

}.

?>..

Comment #2

And to shuffle them .. perhaps ...

Foreach (glob("gflash*.gif") as $filename) {.

$img_string[] = $filename;.

}.

Shuffle($img_string);.

Foreach( $img_string as $numkey => $image ){.

Echo '<img style="padding-right: 5px;" src="'$image'" />'"\n";.

}.

Unset($img_string);..

Comment #3

Doh - missed that..

This might work also, untested:.

<?php.

$filename = glob("gflash*.gif");.

Shuffle($filename);.

For ($i = 0; $i <= 9; $i++) {.

Echo '<img border="0" src="', $filename[$i], '" />';.

}.

?>..

Comment #4

Aaae niice, Thanks.

Gonna try it now, thanks for the replies..

Your names are definitely going to the "I thank the following people for making VS possible:" section..

EDIT:.

Am I allowed to post a link to my Verisign site to show how it worked out?.

This post has been edited by.

Stephan (VS).

: 13 December 2008, 15:22..

Comment #5

Http://www.vscomputing.co.za/catalog/.

But the Verisign site is veeery touch and go. Strugling with getting my Verisign site from my home server to online host..

Luckily the header works fine, It's in the bottom right of the header but not working @ 100%.

UPDATE:.

*YAWN*.

This post has been edited by.

Stephan (VS).

: 17 December 2008, 07:07..

Comment #6

Verisign site Style - Black.

Gif pictures - 5x5px white.

What I want to do:.

Take.

Gflash01.gif.

Gflash02.gif.

Gflash03.gif.

....

Gflash10.gif.

Then line up 10 pics next to each other with a 5px space between them and make the Verisign website dispay them in a random order..

They are white flash/fading gifs with the same name but different flash/fade times..

My goal is to create a random patter emerging for each person who visits my site..

Think of it as a footer on a music composing Verisign website that helps people composing songs to get ideas from emerging patterns...

Comment #7

Hi, Stephan. Excellent idea. I wanted to display a random banner in my header, chosen from among several variations, and someone helped me out by sharing some code to do that. I am not all that handy with the php, so I'm sure there's a better way to do it, but I did think of a method to recycle the code I use, to accomplish what you want to do. If I were going to try it, today, I'd start a new file, call it "flasher.php," or something, and I'd put code like this in it:.

<?php.

/* coded for 10 random images, in a table 5 columns wide */.

$br = rand(0,9);.

Switch ( $br ) {.

Case 0:.

$random_image ='gflash01.gif'; /* change the image name here */.

Break;.

Case 1:.

$random_image ='gflash02.gif'; /* change the image name here */.

Break;.

Case 2:.

$random_image ='gflash03.gif'; /* change the image name here */.

Break;.

Case 3:.

$random_image ='gflash04.gif'; /* change the image name here */.

Break;.

Case 4:.

$random_image ='gflash05.gif'; /* change the image name here */.

Break;.

Case 5:.

$random_image ='gflash06.gif'; /* change the image name here */.

Break;.

Case 6:.

$random_image ='gflash07.gif'; /* change the image name here */.

Break;.

Case 7:.

$random_image ='gflash08.gif'; /* change the image name here */.

Break;.

Case 8:.

$random_image ='gflash09.gif'; /* change the image name here */.

Break;.

Case 9:.

$random_image ='gflash10.gif'; /* change the image name here */.

Break;.

}.

?>.

<table width="50%" cellpadding="0" cellspacing="5">.

<tr>.

<td><?php echo tep_image(DIR_WS_IMAGES$random_image); ?></td>.

<?php.

$br = rand(0,9);.

Switch ( $br ) {.

Case 0:.

$random_image ='gflash01.gif'; /* change the image name here */.

Break;.

Case 1:.

$random_image ='gflash02.gif'; /* change the image name here */.

Break;.

Case 2:.

$random_image ='gflash03.gif'; /* change the image name here */.

Break;.

Case 3:.

$random_image ='gflash04.gif'; /* change the image name here */.

Break;.

Case 4:.

$random_image ='gflash05.gif'; /* change the image name here */.

Break;.

Case 5:.

$random_image ='gflash06.gif'; /* change the image name here */.

Break;.

Case 6:.

$random_image ='gflash07.gif'; /* change the image name here */.

Break;.

Case 7:.

$random_image ='gflash08.gif'; /* change the image name here */.

Break;.

Case 8:.

$random_image ='gflash09.gif'; /* change the image name here */.

Break;.

Case 9:.

$random_image ='gflash10.gif'; /* change the image name here */.

Break;.

}.

?>.

<td><?php echo tep_image(DIR_WS_IMAGES$random_image); ?></td>.

<?php.

$br = rand(0,9);.

Switch ( $br ) {.

Case 0:.

$random_image ='gflash01.gif'; /* change the image name here */.

Break;.

Case 1:.

$random_image ='gflash02.gif'; /* change the image name here */.

Break;.

Case 2:.

$random_image ='gflash03.gif'; /* change the image name here */.

Break;.

Case 3:.

$random_image ='gflash04.gif'; /* change the image name here */.

Break;.

Case 4:.

$random_image ='gflash05.gif'; /* change the image name here */.

Break;.

Case 5:.

$random_image ='gflash06.gif'; /* change the image name here */.

Break;.

Case 6:.

$random_image ='gflash07.gif'; /* change the image name here */.

Break;.

Case 7:.

$random_image ='gflash08.gif'; /* change the image name here */.

Break;.

Case 8:.

$random_image ='gflash09.gif'; /* change the image name here */.

Break;.

Case 9:.

$random_image ='gflash10.gif'; /* change the image name here */.

Break;.

}.

?>.

<td><?php echo tep_image(DIR_WS_IMAGES$random_image); ?></td>.

<?php.

$br = rand(0,9);.

Switch ( $br ) {.

Case 0:.

$random_image ='gflash01.gif'; /* change the image name here */.

Break;.

Case 1:.

$random_image ='gflash02.gif'; /* change the image name here */.

Break;.

Case 2:.

$random_image ='gflash03.gif'; /* change the image name here */.

Break;.

Case 3:.

$random_image ='gflash04.gif'; /* change the image name here */.

Break;.

Case 4:.

$random_image ='gflash05.gif'; /* change the image name here */.

Break;.

Case 5:.

$random_image ='gflash06.gif'; /* change the image name here */.

Break;.

Case 6:.

$random_image ='gflash07.gif'; /* change the image name here */.

Break;.

Case 7:.

$random_image ='gflash08.gif'; /* change the image name here */.

Break;.

Case 8:.

$random_image ='gflash09.gif'; /* change the image name here */.

Break;.

Case 9:.

$random_image ='gflash10.gif'; /* change the image name here */.

Break;.

}.

?>.

<td><?php echo tep_image(DIR_WS_IMAGES$random_image); ?></td>.

<?php.

$br = rand(0,9);.

Switch ( $br ) {.

Case 0:.

$random_image ='gflash01.gif'; /* change the image name here */.

Break;.

Case 1:.

$random_image ='gflash02.gif'; /* change the image name here */.

Break;.

Case 2:.

$random_image ='gflash03.gif'; /* change the image name here */.

Break;.

Case 3:.

$random_image ='gflash04.gif'; /* change the image name here */.

Break;.

Case 4:.

$random_image ='gflash05.gif'; /* change the image name here */.

Break;.

Case 5:.

$random_image ='gflash06.gif'; /* change the image name here */.

Break;.

Case 6:.

$random_image ='gflash07.gif'; /* change the image name here */.

Break;.

Case 7:.

$random_image ='gflash08.gif'; /* change the image name here */.

Break;.

Case 8:.

$random_image ='gflash09.gif'; /* change the image name here */.

Break;.

Case 9:.

$random_image ='gflash10.gif'; /* change the image name here */.

Break;.

}.

?>.

<td><?php echo tep_image(DIR_WS_IMAGES$random_image); ?></td>.

/* copy/paste 5 more cells worth here, then delete this comment */.

</tr>.

</table>.

That code will give you a table with 5 of your flashing gifs across, totally random. You can copy and paste to make it longer to achieve the 10 you want. Just make sure the </tr></table> is at the end, and only occurs once. You would also want to adjust the width of the table to fit where you want it, and adjust the cellspacing/cellpadding to achieve just the look you want. I'd upload that flasher.php file to my catalog/includes folder, then I could call it anywhere I wanted on any page, by adding.

<?php include(DIR_WS_INCLUDES'flasher.php') ?>.

Wherever I wanted it. You'd also need to upload your flashing gifs to the catalog/images folder, of course. I tested this concept just a little bit, using my banners, and was able to get several different (random) banners to show up on a page. I'm sure there must be an easier, prettier, more efficient way of coding the same thing, I'm just not good enough with the php to know what it is offhand. LOL Try it out, or as I said, someone who knows what they're talking about will come along and show you a proper method. I had fun thinking about it and trying it out myself..

Namast,.

Russ..

Comment #8


This question was taken from a support group/message board and re-posted here so others can learn from it.

 

Categories: Home | Diet & Weight Management | Vitamins & Supplements | Herbs & Cleansing |

Sexual Health | Medifast Support | Nutrisystem Support | Medifast Questions |

Web Hosting | Web Hosts | Website Hosting | Hosting |

Web Hosting | GoDaddy | Digital Cameras | Best WebHosts |

Web Hosting FAQ | Web Hosts FAQ | Hosting FAQ | Hosting Group |

Hosting Questions | Camera Tips | Best Cameras To Buy | Best Cameras This Year |

Camera Q-A | Digital Cameras Q-A | Camera Forum | Nov 2010 - Cameras |

Oct 2010 - Cameras | Oct 2010 - DSLRs | Oct 2010 - Camera Tips | Sep 2010 - Cameras |

Sep 2010 - DSLRS | Sep 2010 - Camera Tips | Aug 2010 - Cameras | Aug 2010 - DSLR Tips |

Aug 2010 - Camera Tips | July 2010 - Cameras | July 2010 - Nikon Cameras | July 2010 - Canon Cameras |

July 2010 - Pentax Cameras | Medifast Recipes | Medifast Recipes Tips | Medifast Recipes Strategies |

Medifast Recipes Experiences | Medifast Recipes Group | Medifast Recipes Forum | Medifast Support Strategies |

Medifast Support Experiences |

 

(C) Copyright 2010 All rights reserved.