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

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

Replies are listed 'Best First'.
Re: Re: Re: Re: Hit Counter Using IMG Tag To Call Script
by samtregar (Abbot) on May 12, 2002 at 22:01 UTC
    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