visit a page max 2 times

B

bb

hello,
I'm really not an expert in javascript, so i ask if anyone over here
is able to make a small script which does the following:

-a visitor click a link to my page
-he can look this page as long as he wants
-he clicks the link to my page a second time, still ok
-he tries it a third time, and then he should be redirected to an
other page.

Is this possible. Maybe need a cookie? And i really don;t know how to
work with cookies.

Thank you so much already! Bas
 
K

kaeli

hello,
I'm really not an expert in javascript, so i ask if anyone over here
is able to make a small script which does the following:

-a visitor click a link to my page
-he can look this page as long as he wants
-he clicks the link to my page a second time, still ok
-he tries it a third time, and then he should be redirected to an
other page.

Is this possible. Maybe need a cookie? And i really don;t know how to
work with cookies.

Sure. When I clear the cookie, I can revisit again. Cool. I clear my
cookies daily.

IOW, you really can't do this without some server-side stuff and an IP
addy. And even that won't work all the time, since people use proxy
servers and stuff.
You want to limit visits, you need to make them have a REAL username and
password (Database and secure server-side) and you update the DB with
each visit, etc.


--
--
~kaeli~
Murphy's Law #2030: If at first you don't succeed, destroy
all evidence that you tried.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace
 
B

bb

kaeli said:
Sure. When I clear the cookie, I can revisit again. Cool. I clear my
cookies daily.

IOW, you really can't do this without some server-side stuff and an IP
addy. And even that won't work all the time, since people use proxy
servers and stuff.
You want to limit visits, you need to make them have a REAL username and
password (Database and secure server-side) and you update the DB with
each visit, etc.


--


how can i do this with an serverside script as well? It's not really a
problem that it's not in 100% of the cases working.
 
B

bb

kaeli said:
Sure. When I clear the cookie, I can revisit again. Cool. I clear my
cookies daily.

IOW, you really can't do this without some server-side stuff and an IP
addy. And even that won't work all the time, since people use proxy
servers and stuff.
You want to limit visits, you need to make them have a REAL username and
password (Database and secure server-side) and you update the DB with
each visit, etc.


--


how can i do this with an serverside script as well? It's not really a
problem that it's not in 100% of the cases working.
 
M

Markus Ernst

bb said:
kaeli <[email protected]> wrote in message


how can i do this with an serverside script as well? It's not really a
problem that it's not in 100% of the cases working.

You have to get the information what serverside script languages are running
on your server and then ask in the related newsgroups.
 
K

kaeli

how can i do this with an serverside script as well? It's not really a
problem that it's not in 100% of the cases working.

Depends. Check with your host on what languages they support. Get a
database or at the least a flat file.

I could help you with ASP, JSP, or PHP. I suck at Perl (CGI), so you'd
need to ask in a Perl group. Unfortunately, most hosts only support Perl
(free). More and more are doing PHP, though, so if they have that, use
it.

Also, find out if your server uses Apache as the web server. It's
easiest to do file protection with.
If your server is Microsoft, they probably use IIS and have ASP
available. Then you'd have to talk to the admin to protect your stuff
unless your server has a tool for it (many do).

--
 
T

Thomas 'PointedEars' Lahn

kaeli said:
hello,
I'm really not an expert in javascript, so i ask if anyone over here
is able to make a small script which does the following:

-a visitor click a link to my page
-he can look this page as long as he wants
-he clicks the link to my page a second time, still ok
-he tries it a third time, and then he should be redirected to an
other page.
[...]

[...]
IOW, you really can't do this without some server-side stuff and an IP
addy. [...]

Again: IP(v4) addresses are usually either dynamic or are static and refer
to a proxy server, so evaluating them does not help in such cases.

BTW: Your "From:" header violates Internet standards since there is no valid
domain NOSPAM.comcast.net within DNS, according to the comcast.net primary
MX. So (e-mail address removed) cannot be a mailbox since "A mailbox
receives mail."


PointedEars
 
D

Dr John Stockton

JRS: In article <[email protected]>, seen in
Thomas 'PointedEars' Lahn
BTW: Your "From:" header violates Internet standards since there is no valid
domain NOSPAM.comcast.net within DNS, according to the comcast.net primary
MX. So (e-mail address removed) cannot be a mailbox since "A mailbox
receives mail."

Your manners violate common decency.

You have been repeatedly told that quoting elderly standards
inappropriate to the present situation is arrogantly non-constructive.

When can we expect you to show signs of imminent adulthood?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,021
Latest member
AkilahJaim

Latest Threads

Top