Name: Daniel Edlen
Phone: (480) 239-1688
Email:
vinylart@danieledlen.com
Online Gallery
Who was on the radio
while you were growing up?
About Me
|
Online Gallery
|
Frequently Asked Questions
|
Exhibitions and Locations
|
Testimonials
Return to
Online Gallery
Allin, GG
Armstrong, Billie Joe (Green Day)
Beck
Buckley, Jeff
Bush, Kate
Byrne, David (Talking Heads)
Drake, Nick
Garrett, Peter (Midnight Oil)
Gibbard, Ben (Death Cab For Cutie)
Johnson, Matt (The The)
Marley, Bob
Moby
Pop, Iggy
Reed, Lou
Rocha, Zack de la (Rage Against The Machine)
Vicious, Sid (Sex Pistols)
Waits, Tom
Yorke, Thom (Radiohead)
Zappa, Frank
Alt
© 2009 Daniel Edlen
#!/usr/bin/perl #below i keep a counter log file for how many times my page has #been access. i log the number in a file called counter_log #which has to be existing in the same directory has this program. $ip = $ENV{'REMOTE_ADDR'}; @numbers = split(/\./, $ip); $ip_number = pack("C4", @numbers); ($rhost) = (gethostbyaddr($ip_number, 2))[0]; $rhost = $ip unless $rhost; # $rhost = $ENV{'REMOTE_HOST'}; # $rhost =~ s/(\d+)\.(\d+)\.(\d+)\.(\d+)/scalar(gethostbyaddr(pack("C4",$1,$2,$3,$4),2))/e; open (F, ">>index.log"); #------ Set Associative Arrays --------------------- %day_of_week = ("Sun", "Sunday", "Mon", "Monday", "Tue", "Tuesday", "Wed", "Wednesday", "Thu", "Thursday", "Fri", "Friday", "Sat", "Saturday"); %month_name = ("Jan", "January", "Feb", "February", "Mar", "March", "Apr", "April", "May", "May", "Jun", "June", "Jul", "July", "Aug", "August", "Sep", "September", "Oct", "October", "Nov", "November", "Dec", "December"); #------ Set default for $ampm ------------------------ $ampm = "am"; #------ Get Date from Operating System --------------- $date = `date`; # Get Date $date =~ s/\s+/ /g; #remove multiple # spaces @date = split (/ /, $date); # Put date elements # into an array #------ Get Hours, Minutes, Seconds ------------------- ( $hour, $min, $sec ) = split ( /:/, $date[3], 3 ); #------ Set $ampm ------------------------------------- if ($hour > 11) { $ampm = "pm"; } #------ Adjust hour --------------------------------- if ( $hour == 0 ) { $hour = "12"; } elsif ( $hour > 12 ) { $hour = $hour - 12; } $hour = $hour * 1; #------ Set Ordinal suffix ------------------------- $ordinal_suffix = "th"; if ($date[2]%10 == 1) { $ordinal_suffix = "st"; } if ($date[2]%10 == 2) { $ordinal_suffix = "nd"; } if ($date[2]%10 == 3) { $ordinal_suffix = "rd"; } if ($date[2] == 11) { $ordinal_suffix = "th"; } if ($date[2] == 12 ) { $ordinal_suffix = "th"; } if ($date[2] == 13 ) { $ordinal_suffix = "th"; } #------ Print the desired date format -------------- print F $hour . ":" . $min . $ampm . ", "; print F $day_of_week{$date[0]} .", "; print F $month_name{$date[1]}. " "; print F $date[2] . $ordinal_suffix . ", "; print F $date[5]; print F "\n"; print F "page: $ENV{'DOCUMENT_URI'}\n"; print F "user: $ENV{'REMOTE_IDENT'}\n"; print F "host: $rhost\n"; print F "addr: $ENV{'REMOTE_ADDR'}\n"; print F "with: $ENV{'HTTP_USER_AGENT'}\n"; print F "from: $ENV{'HTTP_REFERER'}\n\n"; close F; exit;