2014-02-19, 10:20 AM
2014-02-19, 10:58 AM
Host a script on your own server that redirects/outputs a random image each time it is loaded.
Set your avatar to point to that script.
I used to use this script, it finds all PNG and GIF images in the avatars folder and redirects to a random one. It also sends a cache header so that users will only see the avatar change once every 30 minutes.
Set your avatar to point to that script.
I used to use this script, it finds all PNG and GIF images in the avatars folder and redirects to a random one. It also sends a cache header so that users will only see the avatar change once every 30 minutes.
<?php
$folder = 'avatars/';
$settings['img_ext'] = array('.png','.gif');
$flist = array();
foreach($settings['img_ext'] as $ext)
{
$tmp = glob($folder.'*'.$ext);
if (is_array($tmp))
{
$flist = array_merge($flist,$tmp);
}
}
$src = $flist[array_rand($flist)];
$seconds_to_cache = 1800;
$ts = gmdate("D, d M Y H:i:s", time() + $seconds_to_cache) . " GMT";
header("Expires: $ts");
header("Pragma: cache");
header("Cache-Control: max-age=$seconds_to_cache");
header('Location:'.$src);
exit();
?>
2014-02-19, 11:16 AM
Hmm thanks , i will put this in my code box.
2014-02-19, 02:33 PM
2014-02-19, 03:14 PM
(2014-02-19, 02:33 PM)Paul H. Wrote: [ -> ]http://community.mybb.com/thread-151014.html
thanks Paul H. ^
2014-02-22, 02:31 PM
I had this years ago
2014-02-22, 02:32 PM
Matt has this before it was cool. You so hipster you... ^_^