Go Back   the Magicball Network > Forums > MBN Main Forums > Off topic
Buy LBA1/Relentless from GOG.com Buy LBA1/Relentless from DotEmu Buy LBA2/Twinsen's Odyssey from DotEmu Buy LBA2/Twinsen's Odyssey from GOG.com Buy Little big Adventure from GOG.com or DotEmu Buy Little big Adventure 2 from DotEmu or GOG.com

Welcome to the Magicball Network.

You are currently viewing our site as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Off topic General off-topic chat goes in here.

Thread Tools
Old 2002-04-16, 15:16
{}ghost{}'s Avatar
{}ghost{} {}ghost{} is offline
Join Date: Jan 2001
Posts: 4,493
Send a message via ICQ to {}ghost{}
Arrow Wacko -->

Hey Wacko what's the php script for random avatar plz?


Reply With Quote
Old 2002-04-16, 15:22
Bomba!'s Avatar
Bomba! Bomba! is offline
The Prince of all Saiyans
Join Date: Apr 2001
Location: Unfortunately - Earth.
Posts: 2,349
Send a message via ICQ to Bomba!
I don't think you can get random avatars anymore.(here)
"All men dream, but not equally.Those who dream by night in the dusty recesses of their minds, wake in the day to find that it was vanity: but the dreamers of the day are dangerous men, for they may act on their dreams with open eyes, to make them possible." ~Thomas Edward Lawrence

"When you were born, the world rejoiced and you cried. Live your life, so that when you die, you will rejoice and the world will cry." ~ Indian Saying
Reply With Quote
Old 2002-04-16, 15:30
wacko's Avatar
wacko wacko is offline
Magic Ball Master
Join Date: Oct 2000
Posts: 9,919
Doesn't work here, indeed.
Still want it? Then I have to dig it up.

edit: found it.
PHP Code:

Header("Content-type: image/gif");
Header("Cache-Control: no-cache, must-revalidate");
$pic = rand(1,$nr);
$filename = fopen("./$pic.gif","r"); 
Rename your avatars 1.gif, 2.gif etc, change the setting for $nr for how much files you have (6 right now), then save it as avatar.php or something and upload all this in a dir on a php enabled webserver.

I think I also have a script somewhere that can show all avatars on a page.

M'kay, I found the "advanced" version
PHP Code:

$pageTitle="pagetitle here";

if ($ext == ".gif") {

// Show random avatar
Header("Content-type: image/gif");
Header("Cache-Control: no-cache, must-revalidate");

} else {

// Show all avatars on a page
echo "<html>";
echo "<head>";
echo "<title>$pageTitle</title>";
echo "</head>";
echo "<body bgcolor=#FFFFFF>";
echo "<p><font size=+2>$pageTitle</font></p>";
echo "<p>";
for($i=1; $i<=$nr; $i++) {
printf("<image src=\"./%d.gif\">&nbsp;\n", $i);
} echo "</p>";
echo "</body>";
echo "</html>";
} ?>
Call this avatar.php or something, set your avatar link to avatar.php?ext=.gif and use just avatar.php to see all avatars on a page.

The ext=.gif was mainly made to also show it on a forum where they don't allow .php for image extensions

Last edited by wacko; 2002-04-16 at 15:45.
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
has anyone seen this before? i found it on the internet Mannesh Off topic 6 2003-06-09 21:55
wacko for president! Rex_Hollywood Off topic 58 2002-02-05 22:46
The Real Answers of the Test of Tests Atresica Off topic 51 2001-12-20 21:42
The Big Ass Monkey ChaosFish Off topic 18 2001-02-16 20:19
Results of the "Test" Atresica Off topic 11 2001-01-23 08:40

All times are GMT +2. The time now is 17:31.

News Feed
Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright ©2000 - 2019, the Magicball Network