[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] invisible counter doesn't work
- Subject: Re: [cobalt-users] invisible counter doesn't work
- From: Jeff Lasman <jblists@xxxxxxxxxxxxx>
- Date: Sun Jul 30 23:29:04 2000
- Organization: nobaloney.net
Steven Werby wrote:
> > It works (when called from an .shtml file). but it gives me an error on
> > the screen every time it works <frown>.
>
> I tried to duplicate your error. It works fine when $visible = 1. When
> $visible = 0 or is commented out, the browser displays an internal server
> (500) error.
Yes, my webmaster deleted the line completely. I told him he should
have just commented it out; oh well. If he'd commented out I might have
been able to debug/hack it as well. I appreciate your work <smile>.
> > Anyone know why?
>
> I'm far from being a Perl programmer, but I'm an excellent Perl hacker. PHP
> is for programming, Perl is for hacking. I added the following to the
> bottom of count.cgi and it works fine. Delete lines 64-67 and replace them
> with:
>
> print "Content-type: text/html\n\n";
> if ($visible) { print "$count"; }
Will try that.
> > Or have an invisible counter I can use?
>
> I prefer PHP to the overhead of a Perl CGI. YMMV. If you have PHP
> installed, a short PHP script could be used to write to a text file and
> increment a value whenever the page is viewed. Alternately, you could write
> to a MySQL DB.
I believe you. But there are so many Perl CGIs out there, and they're
so easy to just use <smile>.
> I could definitely whip up something for you pretty quickly,
> customized for your needs. On one of my sites I use PHP, MySQL and Apache
> environment variables to track clickthroughs on hyperlinks by timestamp, IP
> address, href and referring page which is useful for analyzing and reporting
> user behavior, link placement and link effectiveness in order to test the
> effectiveness of hyperlinked elements and make informed decisions to
> optimize the site.
Thanks very much for the offer; I may yet take you up on it. Right now
all I need is an invisible counter on a low-volume website. (Low volume
is exactly why we want the counter invisible <wry grin>.) I'm going to
go ahead with this one, with your excellent help <smile>.
Jeff
--
Jeff Lasman <jblists@xxxxxxxxxxxxx>
nobaloney.net
P. O. Box 52672
Riverside, CA 92517
voice: (909) 787-8589 * fax: (909) 782-0205