Parašė Peacemaker· 2009 Sau. 10 20:01:09
#2
srand((float) microtime() * 10000000);
$image[1]['pic']='/location/of/image1.jpg';
$image[1]['link']='/location/of/link1.php';
$image[2]['pic']='/location/of/image2.jpg';
$image[2]['link']='/location/of/link2.php';
$image[3]['pic']='/location/of/image3.jpg';
$image[3]['link']='/location/of/link3.php';
$image[4]['pic']='/location/of/image4.jpg';
$image[4]['link']='/location/of/link4.php';
$image[5]['pic']='/location/of/image5.jpg';
$image[5]['link']='/location/of/link5.php';
$rn = array_rand($image);
echo '<a href="'.$image[$rn]['link'].'">';
echo '<img src="'.$image[$rn]['pic'].'">';
Čia pritaikyta baneriams. Nusiimk link'us ir veiks.