checking entry...

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

    checking entry...

    Does anyone have some code that checks the page that the user entered from?
    I know it's pretty simple to do, but I can't seem to find the right way to
    do it. I just want to check the previous page to redirect if coming in from
    the wrong page.

    Also, is there anyway to do this for an exe to protect the download of an
    exe? Thank you ver much in advance.


  • Lee

    #2
    Re: checking entry...

    arenaTR said:[color=blue]
    >
    >Does anyone have some code that checks the page that the user entered from?
    >I know it's pretty simple to do, but I can't seem to find the right way to
    >do it. I just want to check the previous page to redirect if coming in from
    >the wrong page.
    >
    >Also, is there anyway to do this for an exe to protect the download of an
    >exe? Thank you ver much in advance.[/color]

    The best way to do either of these is on the server, rather than in
    Javascript in the page. Server-side code is the only way to protect
    the exe. How to do it depends on what server-side capabilities you
    have, and is probably beyond the scope of this newsgroup.

    Comment

    • arenaTR

      #3
      Re: checking entry...


      "Lee" <REM0VElbspamtr ap@cox.net> wrote in message
      news:c2adck01gb 4@drn.newsguy.c om...[color=blue]
      > arenaTR said:[color=green]
      > >
      > >Does anyone have some code that checks the page that the user entered[/color][/color]
      from?[color=blue][color=green]
      > >I know it's pretty simple to do, but I can't seem to find the right way[/color][/color]
      to[color=blue][color=green]
      > >do it. I just want to check the previous page to redirect if coming in[/color][/color]
      from[color=blue][color=green]
      > >the wrong page.
      > >
      > >Also, is there anyway to do this for an exe to protect the download of an
      > >exe? Thank you ver much in advance.[/color]
      >
      > The best way to do either of these is on the server, rather than in
      > Javascript in the page. Server-side code is the only way to protect
      > the exe. How to do it depends on what server-side capabilities you
      > have, and is probably beyond the scope of this newsgroup.
      >[/color]

      Thank you very much for getting back to me. Good suggestion on the
      server-side stuff. I'm not as concerned about that now as the client-side.
      Is there any code I can use to prevent entry unless from a specified
      location?

      Thank you in advance again!


      Comment

      • Brian Genisio

        #4
        Re: checking entry...

        arenaTR wrote:
        [color=blue]
        >
        > Thank you very much for getting back to me. Good suggestion on the
        > server-side stuff. I'm not as concerned about that now as the client-side.
        > Is there any code I can use to prevent entry unless from a specified
        > location?
        >
        > Thank you in advance again!
        >[/color]

        Hmmmm... well, what Lee is suggesting is more important. For instance,
        if I am not using a browser with javascript, what happens? If I use
        that browser to get at the exe directly, what happens? These questions
        can only be answered with a server-side solution.

        But, as a client-side thing, you can use the document.referr er property
        to decide how to hide a link, but there is still nothing stopping
        someone from bypassing everything, and linking to the exe directly.

        Brian



        Comment

        • arenaTR

          #5
          Re: checking entry...


          "Brian Genisio" <BrianGenisio@y ahoo.com> wrote in message
          news:4048c092$1 @10.10.0.241...[color=blue]
          > arenaTR wrote:
          >[color=green]
          > >
          > > Thank you very much for getting back to me. Good suggestion on the
          > > server-side stuff. I'm not as concerned about that now as the[/color][/color]
          client-side.[color=blue][color=green]
          > > Is there any code I can use to prevent entry unless from a specified
          > > location?
          > >
          > > Thank you in advance again!
          > >[/color]
          >
          > Hmmmm... well, what Lee is suggesting is more important. For instance,
          > if I am not using a browser with javascript, what happens? If I use
          > that browser to get at the exe directly, what happens? These questions
          > can only be answered with a server-side solution.
          >
          > But, as a client-side thing, you can use the document.referr er property
          > to decide how to hide a link, but there is still nothing stopping
          > someone from bypassing everything, and linking to the exe directly.
          >
          > Brian
          >
          >
          >[/color]

          Brian:

          Thanks so much for your help, it worked on the client side.

          That was easy, though. Any ideas where I can learn about doing a
          server-side check as well? Or perhaps I can learn from some sample code,
          etc.? Thanks again everyone!


          Comment

          • Brian Genisio

            #6
            Re: checking entry...

            arenaTR wrote:
            [color=blue]
            > "Brian Genisio" <BrianGenisio@y ahoo.com> wrote in message
            > news:4048c092$1 @10.10.0.241...
            >[color=green]
            >>arenaTR wrote:
            >>
            >>[color=darkred]
            >>>Thank you very much for getting back to me. Good suggestion on the
            >>>server-side stuff. I'm not as concerned about that now as the[/color][/color]
            >
            > client-side.
            >[color=green][color=darkred]
            >>>Is there any code I can use to prevent entry unless from a specified
            >>>location?
            >>>
            >>>Thank you in advance again!
            >>>[/color]
            >>
            >>Hmmmm... well, what Lee is suggesting is more important. For instance,
            >>if I am not using a browser with javascript, what happens? If I use
            >>that browser to get at the exe directly, what happens? These questions
            >>can only be answered with a server-side solution.
            >>
            >>But, as a client-side thing, you can use the document.referr er property
            >>to decide how to hide a link, but there is still nothing stopping
            >>someone from bypassing everything, and linking to the exe directly.
            >>
            >>Brian
            >>
            >>
            >>[/color]
            >
            >
            > Brian:
            >
            > Thanks so much for your help, it worked on the client side.
            >
            > That was easy, though. Any ideas where I can learn about doing a
            > server-side check as well? Or perhaps I can learn from some sample code,
            > etc.? Thanks again everyone!
            >
            >[/color]

            For server-side, it all depends on your server-side technology. For
            PHP, I know that there is a structure that gives you the information
            that the browser gives the server... I dont remember what it is called,
            but it keeps the referrer value in it.

            Brian

            Comment

            • Juliette

              #7
              Re: checking entry...

              arenaTR wrote:[color=blue]
              >
              > Does anyone have some code that checks the page that the user entered from?
              > I know it's pretty simple to do, but I can't seem to find the right way to
              > do it. I just want to check the previous page to redirect if coming in from
              > the wrong page.
              >
              > Also, is there anyway to do this for an exe to protect the download of an
              > exe? Thank you ver much in advance.[/color]

              Arena,

              Quite apart from the server-side scripting, but depending on what kind
              of server you use, you could also try to protect the file against
              hot-linking and bandwidth-theft (linking to the file from other sites
              than your own and therefore using other people's bandwidth).

              In a unix/linux apache environment, you can do this by placing a
              ..htaccess file in either the home directory of your site or the
              subdirectory which you want to protect.
              For more information, have a look at:
              http://www.javascriptkit.com/howto/htaccess10.shtml or
              http://www.htmlite.com/HTA013.php.
              The examples they give are for images, but I would assume this will work
              equally well for exe files.

              Good luck, Juliette

              Comment

              Working...