CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
Calling Counter without SSI

 



seriousfun
Novice

May 7, 2001, 3:08 AM

Post #1 of 5 (1070 views)
Calling Counter without SSI Can't Post

Is there a way I can call my counter script without relying on SSI



kojr
Novice

May 7, 2001, 7:11 AM

Post #2 of 5 (1066 views)
Re: Calling Counter without SSI [In reply to] Can't Post

This is also the question I like to ask for a long time.
Nice to raise this question.



rjoseph
Novice

May 7, 2001, 1:24 PM

Post #3 of 5 (1063 views)
Re: Calling Counter without SSI [In reply to] Can't Post

Sure, but they require some creative thinking. One way is to in fact have your index file be a cgi script, instead of a HTML document that increments each time someone hits it - of course, this brings up the problem of unique hits, so that is something that you would have to contend with (this is what I use on my site, but it is fairly complicated).

Another possibility is having your script return a GIF image (Try the GD module) which means that you could actually call your script from a <img> tag. Of course, this takes quite a bit of messing with as well.

You could also try to use some tricky client-side scripting (Javascript, VBscript) to call your CGI counter without actually changing the page.

And then there is the ubiquitous "0-height" frame that redirect services (such as CJB.net) have made so pupular. What this does is create a frameset with two frames: one is 100% height, the other 0%, so in effect the 0% frame is not seen at all. However, the document for the 0-height frame must still be retrieved, so the browser must make a server request - if this request is to a CGI script, then VIOLA, you have counted that person. This is also very good because it usually ellimnates the problem of multiple page counts - because the person browses in the 100% frame, the 0% frame doesn't get called again!

Well, those are just some of the ideas that I can think of off the top of my head - I am sure their are others, but those have worked well for me! Have fun with it!

r j o s e p h
"Violence is a last resort of the incompetent" - Foundation


kojr
Novice

May 7, 2001, 4:34 PM

Post #4 of 5 (1057 views)
Re: Calling Counter without SSI [In reply to] Can't Post

Making use of iframe with 0% height seems to be the easiest way to do it.
Well, any demonstration page??



(This post was edited by kojr on May 7, 2001, 3:35 PM)


rjoseph
Novice

May 7, 2001, 4:58 PM

Post #5 of 5 (1056 views)
Re: Calling Counter without SSI [In reply to] Can't Post

Not iframe, just frame.

And no, I can't think of any demos right away, but just look for a CJB.net page - almost all of those use 0-height frames.

r j o s e p h
"Violence is a last resort of the incompetent" - Foundation

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives