![]() |
how to do a random header with css
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 :thumbsup |
How to hotlink a image
<a href="http://galleries.penthouse.com/g/0536/21/?gpid=g950494-pct"><img src="http://www.jensvanassterdam.com/posts/152/karl.jpg" alt="Karlie Montana" target="blank"/> </a>
Use this at one of my sites.. thought i would share |
Why not just have an array of images and use:
<?php srand((float) microtime() * 1000000); $images = array('image1', 'image2', 'image3', ....); echo $images[array_rand($images)]; ?> Or you could use javascript. |
Quote:
|
Quote:
<?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(); ?> |
Quote:
|
All times are GMT -7. The time now is 08:29 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123