in reply to Re: Hit Counter Using IMG Tag To Call Script
in thread Hit Counter Using IMG Tag To Call Script

Same gif, 1/4 the length:

my $gif = pack "H*",'47494638396101000100800000ffffff00000021f90401000 +000002c00000000010001000002024401003b'; binmode STDOUT; # for Win32 users print "Content-type: image/gif\r\n"; print "Content-length: 43\r\n\r\n"; print $gif;

cheers

tachyon

s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

Replies are listed 'Best First'.
Re: Re: Re: Hit Counter Using IMG Tag To Call Script
by tjh (Curate) on May 12, 2002 at 16:22 UTC
    ah, gifgolf
Re: Re: Re: Hit Counter Using IMG Tag To Call Script
by samtregar (Abbot) on May 12, 2002 at 21:58 UTC
    Ooo, can I try? Here's a smaller one:
    use MIME::Base64; my $gif = decode_base64('R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABA +AEAAAICRAEAOw=='); binmode STDOUT; # for Win32 users print "Content-type: image/gif\r\n"; print "Content-length: 43\r\n\r\n"; print $gif;

    -sam

      Which won't work on Macs since \n == \r there, right? I think it has to be:

      print "Content-length: 43\012\015\012\015";

      -sam

        Actually that's a 500 on everything :o)

        printf "\\%#o\\%#o", map{ord}split'', "\r\n"; __DATA__ \015\012
        Line Ending Encodings
        Platform Line Ending   Octal Hex Unicode
        Apple Macintosh CR \r \015 0xD (#x000D)
        UNIX Based Systems LF \n \012 0xA (#x000A)
        DOS Based Systems CRLF \r\n \015\012 0xD0xA (#x000D)(#x000A)

        cheers

        tachyon

        s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print