Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

CGI Clock

by mt2k (Hermit)
on Dec 03, 2002 at 00:20 UTC ( [id://217090]=obfuscated: print w/replies, xml ) Need Help??

This is a script meant for CGI use. You need the GD package installed in order to use this. Simply call the script in a browser and it gives you the current time as supplied by the server. Works with strict, but warnings are disabled because of uninitialized values as well as one depreceated variable :) Time returned in 12 hour format (A.M./P.M.)

#!/usr/bin/perl -T use strict; use GD;@_[2..3,1,rand (1)]=((localtime)[$*++, ,1..1+1],"A.M."); $_[1]-= 12and$_[$| ]="P.M." unless$_[ rand( 1)+1]<12;$_[1]||= 12;push@_ ,sprintf("%02d:%02d:%02d %s",@_[$ * ,3,2,$[]);sub _{print"Content-type: " ,$,,"image/png\n",,,$,,,$',,$_,,,''.' ';binmode STDOUT;print $_[5]->png;}$_ [5]=new GD::Image(9*length$_[4], 2* 2*2*2);$_[6]=$_[5]->colorAllocate ($|,$%,$|);$_[5]->transparent($_[ 6]);$_[6]=$_[5]->colorAllocate ($ |, $%, 255 );$ _[ 5] ->string (gdGiantFont ,$|,$%,@_[4,5]);&_;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: obfuscated [id://217090]
Approved by ybiC
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (2)
As of 2024-04-25 05:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found