in reply to Hit Counter Using IMG Tag To Call Script

this is a single pixel transparent gif:

print "Content-type: image/gif\n\n"; print pack "B*", '0100011101001001010001100011100000111001011000010000 +000100000000000000010000000010000000000000000000000011111111111111111 +111111100000000000000000000000000100001111110010000010000000001000000 +000000000000000000000000000010110000000000000000000000000000000000000 +000010000000000000001000000000000000000000010000000100100010000000001 +0000000000111011';

He who asks will be a fool for five minutes, but he who doesn't ask will remain a fool for life.

Chady | http://chady.net/

Replies are listed 'Best First'.
Re: Re: Hit Counter Using IMG Tag To Call Script
by tachyon (Chancellor) on May 12, 2002 at 16:17 UTC

    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

      ah, gifgolf
      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