Random Sig Changer

zone97

Well-Known Member
OP
Member
Joined
Feb 16, 2005
Messages
466
Trophies
0
Location
Eastern Time zone
Website
Visit site
XP
309
Country
United States
I rewrote my sig changing program to generate a new one everytime you reload the page. This way you will never know what might pop up... Right now there are only 5 but as i get inspired something new may show up..
 

zone97

Well-Known Member
OP
Member
Joined
Feb 16, 2005
Messages
466
Trophies
0
Location
Eastern Time zone
Website
Visit site
XP
309
Country
United States
can i get the code?


here is the perl part.

CODE#! perl
##############################################################################
# Random Sig Generator                                                       #
# Copyright 2007 ZoNE97                                                      #
# Created 03/07/06              Last Modified 02/23/07                       #
##############################################################################
# COPYRIGHT NOTICE                                                           #
#                                                                            #
# Obtain permission before redistributing this software over the Internet or #
# in any other medium.  In all cases copyright and header must remain intact.#
##############################################################################
# Define Variables

$prog = "Random Sig Generator";
$ver = "2.0";
$cgi = "$ENV{'SCRIPT_NAME'}";
$url = "$ENV{'SERVER_URL'}";

chop($cgi) if ($cgi =~ /\n$/);
($blank,$path,$code) = split(/\//,$cgi);

$data_dir = ".\\data";
$sigs_dir = ".\\images";
$image = "mysig";
$game[0] = "_01.png";
$game[1] = "_02.png";
$game[2] = "_03.png";
$game[3] = "_04.png";
$game[4] = "_05.png";

$lower=1000000;
$upper=2000000;
$random = int(rand( $upper-$lower+1 ) ) + $lower;

$start=0;
$end Â=4;
$ransig = int(rand( $end-$start+1 ) ) + $start;

##############################################################################
# Get the input from forms

read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});

if ($ENV{'QUERY_STRING'} ne '') {
 $input = "$ENV{'QUERY_STRING'}";
 chop($input) if ($input =~ /\n$/);
}

##############################################################################
# Where to go...

print "location: $url$path\/images\/$image$game[$ransig]?$random\n\n\n";
 

iza

gbatemp, the new crack
Member
Joined
Aug 28, 2006
Messages
706
Trophies
1
Age
38
Location
Texas
Website
myspace.com
XP
275
Country
United States
kewl, i understand the basics of it... replacing the images with my own and suck, but what is this part; /$image$game[$ransig]?$random\n\n\n"?
also, do i need to change this;
$data_dir = ".\\data";
$sigs_dir = ".\\images";?

and do you just put it in your sig? or do you host the file and embed it?
 

Kyoji

ウッーウッーウマ
Member
Joined
Apr 15, 2003
Messages
5,475
Trophies
2
Age
36
Location
:'(
Website
Visit site
XP
307
Country
United States
May I interject here that a random sig generator can be made in flash, with the same effects, but in a much more simple manner? All you need is a place to host the flash file and the signatures you want to rotate.

If you are interested iza, I'll whip up some code later for you.
[edit]
Of course there are some restrictions with transparency, but if your sigs take up the entirety of the flash document, you're fine.
 

Site & Scene News

General chit-chat
Help Users
  • No one is chatting at the moment.
    SylverReZ @ SylverReZ: @salazarcosplay, Morning