visit a page max 2 times

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • bb

    visit a page max 2 times

    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
  • kaeli

    #2
    Re: visit a page max 2 times

    In article <4a6ed956.04042 11025.4582fa9f@ posting.google. com>,
    b_map@hotmail.c om enlightened us with...[color=blue]
    > 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.
    >[/color]

    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.



    Comment

    • bb

      #3
      Re: visit a page max 2 times

      kaeli <tiny_one@NOSPA M.comcast.net> wrote in message news:<MPG.1af07 fac5e38439c989d 9d@nntp.lucent. com>...[color=blue]
      > In article <4a6ed956.04042 11025.4582fa9f@ posting.google. com>,
      > b_map@hotmail.c om enlightened us with...[color=green]
      > > 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.
      > >[/color]
      >
      > 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.
      >
      >
      > --[/color]


      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.

      Comment

      • bb

        #4
        Re: visit a page max 2 times

        kaeli <tiny_one@NOSPA M.comcast.net> wrote in message news:<MPG.1af07 fac5e38439c989d 9d@nntp.lucent. com>...[color=blue]
        > In article <4a6ed956.04042 11025.4582fa9f@ posting.google. com>,
        > b_map@hotmail.c om enlightened us with...[color=green]
        > > 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.
        > >[/color]
        >
        > 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.
        >
        >
        > --[/color]


        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.

        Comment

        • Markus Ernst

          #5
          Re: visit a page max 2 times

          "bb" <b_map@hotmail. com> schrieb im Newsbeitrag
          news:4a6ed956.0 404230313.46c2d d31@posting.goo gle.com...[color=blue]
          > kaeli <tiny_one@NOSPA M.comcast.net> wrote in message[/color]
          news:<MPG.1af07 fac5e38439c989d 9d@nntp.lucent. com>...[color=blue][color=green]
          > > In article <4a6ed956.04042 11025.4582fa9f@ posting.google. com>,
          > > b_map@hotmail.c om enlightened us with...[color=darkred]
          > > > 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.
          > > >[/color]
          > >
          > > 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.
          > >
          > >
          > > --[/color]
          >
          >
          > 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.[/color]

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

          --
          Markus


          Comment

          • kaeli

            #6
            OT: Re: visit a page max 2 times

            In article <4a6ed956.04042 22211.5957b3f2@ posting.google. com>,
            b_map@hotmail.c om enlightened us with...[color=blue]
            >
            >
            > 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.
            >[/color]

            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).

            --
            --
            ~kaeli~
            Bakers trade bread recipes on a knead-to-know basis.



            Comment

            • Thomas 'PointedEars' Lahn

              #7
              Re: visit a page max 2 times

              kaeli wrote:
              [color=blue]
              > In article <4a6ed956.04042 11025.4582fa9f@ posting.google. com>,
              > b_map@hotmail.c om enlightened us with...[color=green]
              >> 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.
              >> [...][/color]
              >
              > [...]
              > IOW, you really can't do this without some server-side stuff and an IP
              > addy. [...][/color]

              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 tiny_one@NOSPAM .comcast.net cannot be a mailbox since "A mailbox
              receives mail."


              PointedEars

              Comment

              • Dr John Stockton

                #8
                Re: visit a page max 2 times

                JRS: In article <4093357E.90903 09@PointedEars. de>, seen in
                news:comp.lang. javascript, Thomas 'PointedEars' Lahn
                <PointedEars@we b.de> posted at Sat, 1 May 2004 07:28:30 :[color=blue]
                >
                >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 tiny_one@NOSPAM .comcast.net cannot be a mailbox since "A mailbox
                >receives mail."[/color]

                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?

                --
                © John Stockton, Surrey, UK. ???@merlyn.demo n.co.uk Turnpike v4.00 MIME. ©
                Web <URL:http://www.merlyn.demo n.co.uk/> - FAQish topics, acronyms, & links.
                Check boilerplate spelling -- error is a public sign of incompetence.
                Never fully trust an article from a poster who gives no full real name.

                Comment

                Working...