Rotating sig on a normal site

Soldato
Joined
18 Oct 2002
Posts
15,177
Lo all

I'm making a basic site using html and I want a picture on the homepage to rotate like the sigs on here. I've tried using rob's guide and I have the .jpeg and .php file in an /images folder but it's just giving me red x's.

I noticed in nikbee's thread when he was having trouble that DJ Binks said this:

DJ Binks said:
Yes, it will generate random code until its in img tags:

could that have something to do with it? being html and not forum code?

Cheers

Panzer
 
Hi,

Code:
<img src="file.php" alt="image name etc" longdesc="image name etc" />

Is how i do it.

Code:
  <p><a href="http://www.kings-kingdom.co.uk"><img src="siteimages/index.php" alt="Kings-Kingdom.co.uk" width="750" height="200" border="0" longdesc="http://www.kings-kingdom.co.uk" /></a></p>

Is my current header on www.kings-kingdom.co.uk !

Edit, it needs to be .php extention (both the index file AND the random generator file) then they need to be uploaded to a space that supports php.
 
Hi Binks, Thanks for the reply :)

I think the problem is I only have one file. All I have is

<?php

$files = glob('{*.PNG,*.png,*.JPG,*.jpg,*.GIF,*.gif}', GLOB_BRACE);
readfile($files[array_rand($files)]);

?>

called rotate in a .php file and then this

<img src="Images/rotate.php">

in my html code.

It seems I'm missing something, hope you can shed some light on this one ;)

*edit* you say they have to be uploaded to a place that supports php, does this mean that in it's current state as just being in a folder on my desktop, it's not going to work?

cheers


Panzer
 
Last edited:
Yes, that is pretty much it. It wont work without it im afraid :( .

Upload it to some space that supports PHP. Also try renaming the index.html file to index.php if it still doesnt work after that. If you want a hand my MSN is in trust :) .
 
Ah right ok thanks Binks. :(

This has to put on CD and presented to my uni group using the lecturers laptop. It's not really going to be practical unfortunately. Any other way I could text to rotate just using html?

Thanks for all your help!

Panzer
 
Back
Top Bottom