Is it possible to rename images dynamically?
Say that I had something like image1.png, and I don't want to rename
it on the server. I'm working on an image rotater for a forum that
doesn't allow anything but image files as signatures.
Here's my code so far:
<?php
//LolRotator
//add images. not too hard.
$images = array("image1.png", "image2.png", "image3.png");
//which one do we gets?
$show = rand(0, (count($images)-1));
//i r got u picture.
echo '<img src="'.$images[$show].'"/>';
?>
I used mod_rewrite, which makes it from image.php to image.png. But,
because the files aren't named image.png, it doesn't work. I need to
figure out somethign between lines 8 and 10 to change the file name to
image.png.
Is there a way to do this?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php