How to know from where you come?

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

    #1

    How to know from where you come?

    Hi at all

    I have a little problem (for you) that for me is a mission impossible.

    I have two web site

    The first site conain a link to the 2th. and 2th.web site contain a link to
    the first.

    I have a log1.txt an a log2.txt to control access.

    I'ld want writeINTO THEM FROM WHERE VISITOR COME.

    If visitor come from first web site clicking the link I want to write into
    the log that visitors come from my first web site amd so on with the 2th.



    Is it possible?

    Thank in advance and best regards to all.


  • =?ISO-8859-15?Q?Iv=E1n_S=E1nchez_Ortega?=

    #2
    Re: How to know from where you come?

    Pablo wrote:
    Is it possible?
    Yes.

    Do some research on HTTP referrers.

    --
    ----------------------------------
    Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-

    If you learn one useless thing every day, in a single year you'll learn
    365 useless things.

    Comment

    • Michael Fesser

      #3
      Re: How to know from where you come?

      ..oO(Iván Sánchez Ortega)
      >Pablo wrote:
      >
      >Is it possible?
      >
      >Yes.
      >
      >Do some research on HTTP referrers.
      And on how unreliable they are. What about URL parameters?

      on site 1: <a href="http://site2.example.c om?ref=site1">s ite 2</a>
      on site 2: <a href="http://site1.example.c om?ref=site2">s ite 1</a>

      Micha

      Comment

      • =?ISO-8859-15?Q?Iv=E1n_S=E1nchez_Ortega?=

        #4
        Re: How to know from where you come?

        Michael Fesser wrote:
        >>Do some research on HTTP referrers.
        >
        And on how unreliable they are. What about URL parameters?
        Unreliable as well?

        --
        ----------------------------------
        Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-

        The very ink with which all history is written is merely fluid prejudice.
        -- Mark Twain

        Comment

        • Benjamin

          #5
          Re: How to know from where you come?

          On Jun 27, 5:29 pm, Iván Sánchez Ortega <ivansanchez-...@rroba-
          escomposlinux.-.punto.-.orgwrote:
          Michael Fesser wrote:
          >Do some research on HTTP referrers.
          >
          And on how unreliable they are. What about URL parameters?
          >
          Unreliable as well?
          Well, you have to draw the line somewhere. Unless where the user came
          from is application essential URL strings are probably your best bet.
          >
          --
          ----------------------------------
          Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-
          >
          The very ink with which all history is written is merely fluid prejudice.
          -- Mark Twain

          Comment

          • joboils@hotmail.com

            #6
            Re: How to know from where you come?

            On Thu, 28 Jun 2007 02:47:48 -0000, Benjamin
            <musiccompositi on@gmail.comwro te:
            >On Jun 27, 5:29 pm, Iván Sánchez Ortega <ivansanchez-...@rroba-
            >escomposlinu x.-.punto.-.orgwrote:
            >Michael Fesser wrote:
            >>Do some research on HTTP referrers.
            >>
            And on how unreliable they are. What about URL parameters?
            >>
            >Unreliable as well?
            >Well, you have to draw the line somewhere. Unless where the user came
            >from is application essential URL strings are probably your best bet.
            >>
            >--
            >----------------------------------
            >Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-
            >>
            >The very ink with which all history is written is merely fluid prejudice.
            > -- Mark Twain
            >
            Why not write the data into the file as they click to leave each site
            - not as they click upon entering each site?

            Comment

            • =?ISO-8859-15?Q?Iv=E1n_S=E1nchez_Ortega?=

              #7
              Re: How to know from where you come?

              joboils@hotmail .com wrote:
              Why not write the data into the file as they click to leave each site
              - not as they click upon entering each site?
              Because there is not a clear and easy way to know when a "user leaves a
              site".

              Logging page hits, on the other hand, is pretty trivial.

              --
              ----------------------------------
              Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-

              Desde luego, la ciencia ha logrado cosas maravillosas, pero yo preferiría,
              con mucho, ser feliz a tener razón.
              -- Slartibarfast en "La Guía del Autoestopista Galáctico"

              Comment

              • joboils@hotmail.com

                #8
                Re: How to know from where you come?

                On Thu, 28 Jun 2007 09:27:45 +0200, Iván Sánchez Ortega
                <ivansanchez-alg@rroba-escomposlinux.-.punto.-.orgwrote:
                >joboils@hotmai l.com wrote:
                >
                >Why not write the data into the file as they click to leave each site
                >- not as they click upon entering each site?
                >
                >Because there is not a clear and easy way to know when a "user leaves a
                >site".
                >
                >Logging page hits, on the other hand, is pretty trivial.
                A user leaves a site when they click on a link to do so(!).
                If a link on site 1 points the visitor to site 2, the script opens a
                file, adds to the hit number in that file and closes the file again.

                Comment

                • rf

                  #9
                  Re: How to know from where you come?


                  <joboils@hotmai l.comwrote in message
                  news:4h2783llmq p4qnumivvntrslm qhoq08036@4ax.c om...
                  On Thu, 28 Jun 2007 09:27:45 +0200, Iván Sánchez Ortega
                  <ivansanchez-alg@rroba-escomposlinux.-.punto.-.orgwrote:
                  >
                  >>joboils@hotma il.com wrote:
                  >>
                  >>Why not write the data into the file as they click to leave each site
                  >>- not as they click upon entering each site?
                  >>
                  >>Because there is not a clear and easy way to know when a "user leaves a
                  >>site".
                  >>
                  >>Logging page hits, on the other hand, is pretty trivial.
                  >
                  A user leaves a site when they click on a link to do so(!).
                  Or if they hit the back button.
                  Or if they choose one of their favourites.
                  Or if they type in a new URL in the address bar.
                  Or if they right click and choose to open the link in a new tab/window.
                  Or if they simply wander off to the pub because the power has failed.

                  You can *never* tell when somebody leaves a site.
                  If a link on site 1 points the visitor to site 2, the script opens a
                  file, adds to the hit number in that file and closes the file again.
                  What script? Where? On the client? On the server? On the new page?
                  Surely not on the old page, that has long since gone.

                  And if the viewer chooses to [right-click open in a new tab] on that link?
                  You will never know. Neither "site" will know. The web is stateless. You do
                  *not* know what has happened previously.

                  --
                  Richard.


                  Comment

                  • Michael Fesser

                    #10
                    Re: How to know from where you come?

                    ..oO(Iván Sánchez Ortega)
                    >Michael Fesser wrote:
                    >
                    >>>Do some research on HTTP referrers.
                    >>
                    >And on how unreliable they are. What about URL parameters?
                    >
                    >Unreliable as well?
                    Indeed. None of them is really reliable or secure.

                    Micha

                    Comment

                    • Michael Fesser

                      #11
                      Re: How to know from where you come?

                      ..oO(joboils@ho tmail.com)
                      >A user leaves a site when they click on a link to do so(!).
                      Yep, and the script on site 1 won't notice that. No browser sends a
                      "good bye, I'm leaving now".

                      Or do you think of a kind of redirection script on site 1, which logs
                      the request?

                      <a href="redirect? url=site2.examp le.com">site 2</a>

                      That's just _one_ way to "leave" a site. There are a dozen others.

                      Micha

                      Comment

                      • Toby A Inkster

                        #12
                        Re: How to know from where you come?

                        Michael Fesser wrote:
                        Iván Sánchez Ortega wrote:
                        >
                        >Do some research on HTTP referrers.
                        >
                        And on how unreliable they are.
                        They are "reliable enough" for *many* purposes.

                        --
                        Toby A Inkster BSc (Hons) ARCS
                        [Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
                        [OS: Linux 2.6.12-12mdksmp, up 7 days, 14:46.]

                        Long-Awaited Zeldman Article

                        Comment

                        • =?ISO-8859-15?Q?Iv=E1n_S=E1nchez_Ortega?=

                          #13
                          Re: How to know from where you come?

                          rf wrote:
                          You can *never* tell when somebody leaves a site.
                          You can never *reliably* tell when somebody leaves a site.

                          You can do some assumptions, though. e.g., "A user has left my site if I
                          haven't received any hits from him in the last 5 minutes" or "A user has
                          left my site if his session has expired".
                          The web is stateless.
                          Better said, HTTP is a stateless protocol.

                          And, seriously, anyone not understanding this concept should go back to his
                          books.

                          --
                          ----------------------------------
                          Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-

                          What? You search? You would multiply yourself by ten, by a hundred? You seek
                          followers? Seek zeros!
                          -- Friedrich Nietzsche [1844 - 1900]

                          Comment

                          Working...