05-17-2007, 09:09 AM
(Este mensaje fue modificado por última vez en: 05-17-2007, 09:59 AM por mrm.)
Código PHP:
<?php
//--------------------------------
// Random Image Script v1.0 by InvisionThings.com
// Copyright 2003 cgriego [Chris Griego]
// http://www.invisionthings.com/
// Setup the information about our random images
$imgs = array(
// Image Name/Path MIME Type (Look below for common Image MIME types)
array("./FirmaFate.jpg", "image/jpg",),
array("./a&cny.png", "image/png",),
array("./arcueid3la.png", "image/png",),
array("./firma eureka7.png", "image/png",),
array("./firmacalvin.png", "image/png",),
array("./firmaff8.png", "image/png",),
array("./firmafullmetal.png", "image/png",),
array("./firmagaara.png", "image/png",),
array("./firmaway.png", "image/png",),
array("./firmica.png", "image/png",),
array("./haytabla.gif", "image/gif",),
array("./FirmaDeathNote.jpg", "image/jpg",),
array("./NODAME.jpg", "image/jpg",),
array("./fma.png", "image/png",),
);
/*
| Common Image MIME types
| GIF: "image/gif"
| JPG: "image/jpeg", "image/pjpeg"
| PNG: "image/png", "image/x-png"
*/
// There is no need to edit anything below this line.
// Seed the random number generator
$mtime = microtime();
$mtime = explode(' ', $mtime);
$mtime = $mtime[1] + $mtime[0];
srand($mtime);
// Find the total images
$imgs_total = count($imgs);
// Choose a random number from 0 to end of array
$random = rand(0, ($imgs_total - 1));
// Make sure the user is going to actually keep retreiving the image (an image in cache is not random)
@header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
@header("Cache-Control: no-cache, must-revalidate");
@header("Pragma: no-cache");
// Required, tells the browser what time of file we're sending it's way.
@header("Content-Type: ".$imgs[$random][1]);
// open the picture file
@readfile($imgs[$random][0]);
// End Random Image script
//--------------------------------
?>
Ãste me lo pasó Kiwoore hace tiempo, soporta jpg, png y gif ^_^. Yo lo tengo hospedado en Lycos, y os digo que es muy intuitivo, y mira que yo para estas cosas soy un poco memb.