#!/usr/bin/perl
######################################################################
# This script will randomly select an icon from your icon dir and
# pass it to the requester.
# By Uzbeck aka NiFiGaSebe!, mafia_zhivet@hotmail.com
######################################################################
# Put this in your pages:
# <link rel="shortcut icon" href="/scripts/icon.pl">

# ABSOLUTE Path to icons (ends with "/"):
$path = "/path_to_your/dir/public_html/";

# FileNames of icons you want to be used:
@list = ('uinc1.ico', 'uinc2.ico', 'uinc3.ico');

######################################################################
# Don't change anything past this line
$array_size = @list;

$icon_no = rand($array_size);
$icon_no = int ($icon_no);

$file = $path . $list[$icon_no];

print "Content-Type: image/x-icon\n\n";

open(ICON,$file);
print <ICON>;
close(ICON);

1;
