Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

To open a window for the visitor (?)

Quote Reply
To open a window for the visitor (?)

There is a solution to open a window if the user is the 1000 visitors.

if visitor == 1000
Message: You are the 1000 visitors...

The cheaters should be avoided !

Utilistation : Plays...

An idea ?

Thank you for your answers.


Last edited by:

mick31: Nov 10, 2003, 5:25 AM
Quote Reply
Re: [mick31] To open a window for the visitor (?) In reply to
Could do something like;


sub {

my $count;
open(READIT,"counter.cnt") || return $!;
$count = <READIT>


open(WRITEIT,">counter.cnt") || return $!;
print WRITEIT $count;

unless ($count % 1000) {
return { is_special_visitor => 1 }
} else {
return { is_special_visitor => 0 }


Make sure at the top of your template you have;


This *WILL NOT* return anything.. its simply used to do the checking etc.

You can then use something like;

<%if is_special_visitor%>
... pop up HTML stuff

This is untested.. but in theory it should work (on a not so high traffic site).


Andy (mod)
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!