#!/usr/local/bin/perl5.001 ###################################################################### # AppUtils Loading and Configuration ###################################################################### # Include the apputils directory which has all the SDK utilities BEGIN { push (@INC, "apputils"); } # Path to SDK apputils # Load required application utilities require 'DeckUtils.pl'; require 'FileUtils.pl'; ($sec, $min, $hour, $mday, $mon, $year, $wday) = gmtime(time); $mon = (qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec))[$mon]; $wday = (qw(Sun Mon Tue Wed Thur Fri Sat))[$wday]; $year = $year + 1900; if ($hour<10){ $hour = '0'.$hour; } if ($min<10){ $min = '0'.$min; } if($sec<10){ $sec = '0'.$sec; } $day =$wday .',' .' '.$mday.'-'.$mon.'-'.$year.' '.$hour.':'.$min.':'.$sec; $day = $day.' '.'GMT'; # # The XML Prologue and WML DTD # $header= ' '; $deck= '

Cookie will expire after '.$day.'

'; &deckDump; ####################################### # # Output a deck, Including cookie info # ###################################### sub deckDump { # Output the HTTP Response string and content type $t = rand 10; print "Content-Location: $t \n"; print "Content-type: text/vnd.wap.wml \n"; print "Set-Cookie: you=''; expires=$day; path=/", "\n"; # Output the data print "\n"; print $header."\n"; # Print out the xml prologue and DTD print $deck; # Print out the deck }