You are not logged in

New York Magazine

Skip to content, or skip to search.

Page Not Found

We apologize for the inconvenience but it appears the link you've selected is broken.


• Please visit our home page and try again.

• To let us know about a broken link, report it here.

#!/usr/local/bin/perl use CGI qw(:standard); use Fcntl qw(:DEFAULT :flock); sub getLogFile { my($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(); my($thismon) = sprintf("%2.0f",$mon+1); my($thismday) = sprintf("%2.0f",$mday); my($thisyear) = $year + 1900; my($logfile) = "linkreport-$thisyear$thismon$thismday.log"; $logfile =~ s/ /0/g; return $logfile; } sub writeLog { my($logline) = @_; my($logfile) = getLogFile(); my($date) = `date`; chop($date); sysopen(FH, "/tmp/$logfile", O_RDWR|O_APPEND|O_CREAT); flock(FH, LOCK_EX);# or die "$!"; print(FH "$date,$logline\n"); close(FH); } print "\n\n"; my $logline = $ENV{HTTP_REFERER}; if ($logline && ($logline !~ /listings/)) { writeLog($logline); }
Current Issue
Subscribe to New York
Subscribe

Give a Gift