View Single Post
Old 05-06-2006, 09:51 AM  
psili
Confirmed User
 
Join Date: Apr 2003
Location: Loveland, CO
Posts: 5,526
Here's a basic PHP one I pulled out of my ass:

pictures.txt
Code:
image1.jpg|http://somelink.com/
imaagagads3.jpg|http://notherlinkg.com/
akadsfd.jpg|http://asdfasdf/
random_image.php
Code:
$file = file("pictures.txt");
list($img,$link) = each(explode("|",$filerand (0, (count($file)-1)));
echo "<a href=\"".$link."\"><img src=\"".$img."\"></a>";
* note, code not checked or validated to work
__________________
Your post count means nothing.
psili is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote