View Single Post
Old 04-18-2008, 09:49 AM  
k0nr4d
Confirmed User
 
k0nr4d's Avatar
 
Industry Role:
Join Date: Aug 2006
Location: Poland
Posts: 9,231
Quote:
Originally Posted by Fris View Post
I use this for one of my sites, Thought I would share

css

#header {
height:140px;
background: #fff url('images/header.php') no-repeat;
padding:0 0 0 0px;
text-align: center;
}

html

<div id="header">
</div>

php code (rename to header.php)

http://alistapart.com/d/randomizer/rotate.txt

enjoy

That could will cause high server load because its using GD. I would just do something like

<?php
Header("Content-Type: image/jpeg");
$images = array('img1.jpg','img2.jpg','img3.jpg');
shuffle($images);
$string = file_get_contents('headers/'.$images[0]);
echo $string;
exit();
?>
k0nr4d is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote