Yeah, right:
MPavatar.php: (with slight modifications)
code:
<?PHP
$pics["pic"] = array (
'avatar1.jpg',
'avatar2.jpg' ,
'avatar3.jpg' //and so on
);
$pics["title"] = array (
'Bill Gates showing the latest Messenger Plus! Technologies',
'Vitto Corleone, the Godfather, proud of his MP! pin, as new member of the forum family',
'George W. Bush revealing the existance of evil code in MP! capable to destruct CIA\'s infrastructure' //and so on
);
$pics["date"] = array (
'2004-01-17',
'2004-01-17',
'2004-01-19' //and so on
);
$pics["author"] = array (
'KeyStorm' ,
'KeyStorm' ,
'KeyStorm' //and so on
);
if($view=="gui"){
if(empty($i))$i=1;
$id=$i-1;
echo"
<html>
<head>
<title>KeyStorm's Dynamic Messenger Plus! Avatars - Showing $i of ".sizeof($pics["pic"])."</title>
</head>
<html>
<body bgcolor='#38688B' text='#CCCCCC'>
<basefont face='Geneva, Arial, Helvetica, sans-serif' color='#CCCCCC' size='2'>
<center>
<h2>
Keystorm's Messenger Plus! Dynamic Avatar Collection
</h2>
<h4>User Interface Environment</h4>
<hr>
<h3>Image $i of ".sizeof($pics["pic"])."</h3>
<br>
<img src='MPavatar.php?i=$i' alt='$pics[title][$id]'>
<br><br>
Title: <b>".$pics[title][$id]."</b><br>
Author: <b>".$pics[author][$id]."</b><br>
Added: <b>".$pics[date][$id]."</b><br><br>
<hr>";
for($a=1;$a<=sizeof($pics["pic"]);$a++){
if($a==$i)echo "<font color=white>".($a)."</font> ";
else echo "<a href='MPavatar.php?view=gui&i=".($a)."' style='color:#CCCCCC; text-decoration:none'>".($a)."</a> ";
if($a!=sizeof($pics["pic"])) echo "| ";
}
echo "
<hr>
<font size=-1>
<b>Terms and Conditions/b><br>
All images shown here are property of their respective authors (in this case: ".$pics[author][$id]."). You may freely use them under following conditionsbr>
Written permission of ".$pics[author][$id].", the author. (webmaster ∂ keystorm•net)<br>
Other terms and conditions will be notified thereafter.<br>
All images have a .psd (or equivalent) source-file that can prove the ownership of the image and the owner has therefore authority over it.
</font>
</center>
</body>
</html>
";
}else{
if(empty($i)) $i = time()%sizeof($pics["pic"]);
else $i--;
$filename = $pics["pic"][$i];
header ('Content-type: image/jpeg');
header( 'Content-Disposition: attachment; filename=avatar');
$f = fopen ($filename, 'rb');
fpassthru ($f); }
?>
This way I have a nice dynamic avatar when address is:
http://funmail.keystorm.net/MP!/MPavatar.php
And a nice GUI for browsing the avatars with comments, dates and authors when the address is:
http://funmail.keystorm.net/MP!/MPavatar.php?view=gui
Hope this helps all people wanting to have a dynamic avatar.