#!/usr/local/bin/perl ############# Variables ############## $root = '/path/to/current/directory'; # The full path to the directory the script is in $file = 'status.txt'; # Where the script will write your status $fname = 'Your Name'; # Your first name $bgcolor = "#000000"; # Bgcolor of the table $width = "100%"; # width of the table $pass = "your_pass"; # goto filename.pl?pass ################################### print "Content-Type: text/html\n\n"; read(STDIN, $input, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $input); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $IN{$name} = $value; } ############ Don't edit below these lines unless you know what your doing ################## if ($ENV{'QUERY_STRING'} eq $pass) { &status; } if ($ENV{'CONTENT_LENGTH'} eq "") { open(STATUS,"$root/$file"); $status = ; close(STATUS); print < Status of $fname: $status Product of Script-Stuff EOF sub status { print < Status
Status:
EOF } if ($IN{'action'}) { open(ADD,">$root"); print ADD "$IN{'status'}"; close(ADD); &status; } # Done