However PHP needs to be installed on the server for that to work.
if you want to test it easily, create a new file called 'phpinfo.php'
The contents of that file should be the following line:
<?php phpinfo(); ?>
save, and upload to the server. Then navigate to it, and see if it
works. If so, I'd be willing to code up an image rotator thats bloody
easy to use for Jim, in reparations for my years pirating his works as
a teen without a CC. >.>
On Sat, Aug 23, 2008 at 10:19 PM, danleephoto <athiril_at_gmail.com> wrote:
> Hi, this is the simplest way to do it.
>
> I'm sure youd be familiar with the IMG tag, that you can change the
> diretory and filename to what you want.
>
> change the 3 in rand()%3 to the number of images you have.
>
> (I hope the code shows up as plain text on here)
>
> <?php
>
> srand(time());
> $random = (rand()%3)+1;
>
> ?>
>
> <img src="images/myimage_<?php echo $random; ?>.jpg">
>
> You can plug this in wherever you want the image to be, and just have
> .php instead of .html, or just leave it as .html
>
> If it doesn't work as .html you just need to set up the mime type in
> your hosting config to display as php (which will not break anything),
> very easy to do.
>
> The benefit of this way, is when you've finished it and got it working,
> it works for everyone, indentically, on all browsers, even for people
> running a Windows 95 and IE4.
>
>
Received on Sun Aug 24 2008 - 11:11:51 CDT