Author Online Tracker?

Discussion in 'HTML' started by Ioannis, Mar 2, 2009.

  1. Ioannis

    Ioannis Guest

    Gentlemen,

    Is there any online html code thingy that would allow me to show on my web page
    if I am online? Only ME, the author of the web page.

    Yes, I know these things don't work exactly and are crude. But when I am online
    I usually have my webpage active most of the time. Perhaps a simple javascript
    could do the job by detecting my own presence in my web page?

    Any ideas?

    Many thanks in advance,
    --
    Ioannis --- "There's _always_ a mistake, somewhere".
     
    Ioannis, Mar 2, 2009
    #1
    1. Advertising

  2. Ioannis

    +mrcakey Guest

    "Ioannis" <> wrote in message
    news:1235990033.613972@athprx04...
    > Gentlemen,
    >
    > Is there any online html code thingy that would allow me to show on my web
    > page
    > if I am online? Only ME, the author of the web page.
    >
    > Yes, I know these things don't work exactly and are crude. But when I am
    > online
    > I usually have my webpage active most of the time. Perhaps a simple
    > javascript
    > could do the job by detecting my own presence in my web page?
    >
    > Any ideas?
    >
    > Many thanks in advance,


    You'd need something server side for that - to change a flag variable that
    indicates whether you're on or offline. You'd probably want some kind of
    cookie on your client machine to be able to trigger that behaviour without
    you having to log in. It's relatively simple but not 101 stuff.

    --
    +mrcakey
    www.dreamberry.co.uk
     
    +mrcakey, Mar 2, 2009
    #2
    1. Advertising

  3. Ioannis

    richard Guest

    On Mon, 2 Mar 2009 12:33:51 +0200, "Ioannis" <>
    wrote:

    >Gentlemen,
    >
    >Is there any online html code thingy that would allow me to show on my web page
    >if I am online? Only ME, the author of the web page.
    >
    >Yes, I know these things don't work exactly and are crude. But when I am online
    >I usually have my webpage active most of the time. Perhaps a simple javascript
    >could do the job by detecting my own presence in my web page?
    >
    >Any ideas?
    >
    >Many thanks in advance,



    I just have to know, why do you want to know if you are on the very
    page you created? You can't tell that you are online?

    Kind of like teaching a fish how to swim.
     
    richard, Mar 4, 2009
    #3
  4. Ioannis wrote:
    > Gentlemen,
    >
    > Is there any online html code thingy that would allow me to show on my web page
    > if I am online? Only ME, the author of the web page.
    >
    > Yes, I know these things don't work exactly and are crude. But when I am online
    > I usually have my webpage active most of the time. Perhaps a simple javascript
    > could do the job by detecting my own presence in my web page?
    >
    > Any ideas?


    This sounds like the state of the art weather tool. It's a piece of
    rope. You hang it outside your window. If you see it blowing around,
    then it's windy. It you touch it and it's wet, then it's raining.

    Joking aside, I don't understand what you're asking. If you browse to
    your web page and it comes up, then you're online. If it doesn't, then
    you aren't.
     
    Harlan Messinger, Mar 4, 2009
    #4
  5. On 02 Mar 2009, "Ioannis" <> wrote:

    > Gentlemen,
    >
    > Is there any online html code thingy that would allow me to show on
    > my web page if I am online? Only ME, the author of the web page.
    >
    > Yes, I know these things don't work exactly and are crude. But when I
    > am online I usually have my webpage active most of the time. Perhaps
    > a simple javascript could do the job by detecting my own presence in
    > my web page?
    >
    > Any ideas?
    >
    > Many thanks in advance,


    You could use the php command $_SERVER['HTTP_REFERER'] and check for
    your own ip address but that's real iffy.

    --
    Awful Dog Autry
     
    Awful Dog Autry, Mar 4, 2009
    #5
  6. Awful Dog Autry wrote:

    > "Ioannis" <> wrote:
    >> Is there any online html code thingy that would allow me to show on
    >> my web page if I am online? Only ME, the author of the web page.

    >
    > You could use the php command $_SERVER['HTTP_REFERER'] and check for
    > your own ip address but that's real iffy.


    That's not a command, it's a value, and it does not contain the IP but
    rather obviously the HTTP_REFERER (the page you came from).

    This might: GetHostByName($_SERVER['REMOTE_ADDR'])

    --
    -bts
    -Friends don't let friends drive Windows
     
    Beauregard T. Shagnasty, Mar 4, 2009
    #6
  7. On 04 Mar 2009, "Beauregard T. Shagnasty" <>
    wrote:

    > Awful Dog Autry wrote:
    >
    >> "Ioannis" <> wrote:
    >>> Is there any online html code thingy that would allow me to show on
    >>> my web page if I am online? Only ME, the author of the web page.

    >>
    >> You could use the php command $_SERVER['HTTP_REFERER'] and check for
    >> your own ip address but that's real iffy.

    >
    > That's not a command, it's a value,


    So what?

    > and it does not contain the IP but
    > rather obviously the HTTP_REFERER (the page you came from).


    Look up Ip on Google. Here's my first result (data modified)

    My IP address: xx.x.xxx.xxx
    IP Address Location: Xxxxx in ip address flag United States
    ISP of this IP: Xxxxxxxx

    HTTP_REFERER *IS* the ip address.

    > This might: GetHostByName($_SERVER['REMOTE_ADDR'])


    Here's what the php manual says

    'HTTP_REFERER'
    The address of the page (if any) which referred the user agent to
    the current page. This is set by the user agent. Not all user
    agents will set this, and some provide the ability to modify
    HTTP_REFERER as a feature. In short, it cannot really be trusted.

    'REMOTE_ADDR'
    The IP address from which the user is viewing the current page.

    so if Ioannis wants to know if he's online, REMOTE_ADDR apparently
    provides his address rather than the referring-page address and your
    rather inept correction, despite the fact that HTTP_REFERER *DOES*
    contain an Ip (just not the right one) at least was leading in the
    right direction.


    --
    Awful Dog Autry
     
    Awful Dog Autry, Mar 5, 2009
    #7
  8. Ioannis

    Ioannis Guest

    Awful Dog Autry wrote:
    > On 04 Mar 2009, "Beauregard T. Shagnasty" <>
    > wrote:
    >
    >> Awful Dog Autry wrote:
    >>
    >>> "Ioannis" <> wrote:
    >>>> Is there any online html code thingy that would allow me to show on
    >>>> my web page if I am online? Only ME, the author of the web page.
    >>>
    >>> You could use the php command $_SERVER['HTTP_REFERER'] and check for
    >>> your own ip address but that's real iffy.

    >>
    >> That's not a command, it's a value,

    >
    > So what?
    >
    >> and it does not contain the IP but
    >> rather obviously the HTTP_REFERER (the page you came from).

    >
    > Look up Ip on Google. Here's my first result (data modified)
    >
    > My IP address: xx.x.xxx.xxx
    > IP Address Location: Xxxxx in ip address flag United States
    > ISP of this IP: Xxxxxxxx
    >
    > HTTP_REFERER *IS* the ip address.
    >
    >> This might: GetHostByName($_SERVER['REMOTE_ADDR'])

    >
    > Here's what the php manual says
    >
    > 'HTTP_REFERER'
    > The address of the page (if any) which referred the user agent to
    > the current page. This is set by the user agent. Not all user
    > agents will set this, and some provide the ability to modify
    > HTTP_REFERER as a feature. In short, it cannot really be trusted.
    >
    > 'REMOTE_ADDR'
    > The IP address from which the user is viewing the current page.
    >
    > so if Ioannis wants to know if he's online, REMOTE_ADDR apparently
    > provides his address rather than the referring-page address and your
    > rather inept correction, despite the fact that HTTP_REFERER *DOES*
    > contain an Ip (just not the right one) at least was leading in the
    > right direction.


    Many thanks, guys. Adding one bit of missing info: I need this so that OTHERS
    can see if I am online, not me.

    Now, _I think_ but I am not sure, that I'd also need a bit of "if" branching
    with javascript.

    For example,

    if IP = mine, then display some hardwired html code on the page: "Author online"
    else display some hardwired html code: "Author offline".

    For example, the default would be: "Author offline".

    As soon as I visit my own page, the hardwired html part can change to "Author
    online" so that a visitor can see that, if he visits the page after my visit.

    My apologies if the above is utter stupidity. I am not even sure if it will
    work!

    Many thanks again!
    --
    Ioannis
    "There's _always_ a mistake, somewhere."
    --- Addednum to Murphy's Laws #314.
     
    Ioannis, Mar 5, 2009
    #8
  9. Awful Dog Autry wrote:

    > "Beauregard T. Shagnasty" wrote:
    >> Awful Dog Autry wrote:
    >>> "Ioannis" <> wrote:
    >>>> Is there any online html code thingy that would allow me to show on
    >>>> my web page if I am online? Only ME, the author of the web page.
    >>>
    >>> You could use the php command $_SERVER['HTTP_REFERER'] and check
    >>> for your own ip address but that's real iffy.

    >>
    >> That's not a command, it's a value,

    >
    > So what?


    I just wanted you to know the difference between a command and a value.

    >> and it does not contain the IP but rather obviously the HTTP_REFERER
    >> (the page you came from).

    >
    > Look up Ip on Google. Here's my first result (data modified)


    I know what an IP is. Google returns 652,000,000 results for "IP"

    > HTTP_REFERER *IS* the ip address.


    Not on my planet. It is the URL of the page that 'refered' you to the
    page collecting the information.

    >> This might: GetHostByName($_SERVER['REMOTE_ADDR'])

    >
    > Here's what the php manual says
    >
    > 'HTTP_REFERER'
    > The address of the page (if any) which referred the user agent to
    > the current page. This is set by the user agent. Not all user
    > agents will set this, and some provide the ability to modify
    > HTTP_REFERER as a feature. In short, it cannot really be trusted.


    Read that again carefully. "The address of the page" as in .. what is
    the address of a page? It's the URL.

    > 'REMOTE_ADDR'
    > The IP address from which the user is viewing the current page.


    ...and this is the IP address of the computer viewing the page.

    > so if Ioannis wants to know if he's online, REMOTE_ADDR apparently
    > provides his address rather than the referring-page address and your
    > rather inept correction, despite the fact that HTTP_REFERER *DOES*
    > contain an Ip (just not the right one) at least was leading in the
    > right direction.


    I have a test page for you.
    http://tekrider.net/usenet/referer.php

    It will lead you to another page of mine at a different domain that
    shows both your IP address and the HTTP_REFERER from the calling page,
    using this:

    $ip = gethostbyname($_SERVER['REMOTE_ADDR']);
    $referer = $_SERVER['HTTP_REFERER'];

    --
    -bts
    -Friends don't let friends drive Windows
     
    Beauregard T. Shagnasty, Mar 5, 2009
    #9
  10. Ioannis

    John Hosking Guest

    Ioannis wrote:
    > Gentlemen,


    Els, Adrienne, and Heidi aren't good enough for you?

    >
    > Is there any online html code thingy that would allow me to show [visitors to]
    > my web page if I am online? Only ME, the author of the web page.
    >


    This sounds like the functionality I see on PCs of those who use various
    instant messaging products, like MSN Messenger, Yahoo! Messenger, AOL
    Instant Messenger (AIM), XMPP, ICQ etc. And so, maybe these links will
    lead you to an answer, one that doesn't require you to invent something
    that already exists (at least partially):

    http://en.wikipedia.org/wiki/Windows_Live_Messenger

    http://en.wikipedia.org/wiki/Windows_Live_Messenger_IM_Control

    WP says, "Windows Live Messenger IM Control is a service provided by
    Microsoft as part of its Windows Live services which enables websites or
    blogs to show the presence of Windows Live Messenger users..."

    I have no idea if this meets your needs, how well it works, or what
    security issues this raises. GL.

    --
    John
    Possessive "its" has no apostrophe. Even on the Internet.
     
    John Hosking, Mar 5, 2009
    #10
  11. Ioannis

    +mrcakey Guest

    "Ioannis" <> wrote in message
    news:1236283437.719385@athprx04...
    <snip>
    >
    > Many thanks, guys. Adding one bit of missing info: I need this so that
    > OTHERS
    > can see if I am online, not me.
    >
    > Now, _I think_ but I am not sure, that I'd also need a bit of "if"
    > branching
    > with javascript.
    >
    > For example,
    >
    > if IP = mine, then display some hardwired html code on the page: "Author
    > online"
    > else display some hardwired html code: "Author offline".
    >
    > For example, the default would be: "Author offline".
    >
    > As soon as I visit my own page, the hardwired html part can change to
    > "Author
    > online" so that a visitor can see that, if he visits the page after my
    > visit.
    >
    > My apologies if the above is utter stupidity. I am not even sure if it
    > will
    > work!
    >
    > Many thanks again!
    > --
    > Ioannis


    Like I said earlier, having actually read and understood your requirement,
    you need cookie processing (or a login) to detect when you're on your site
    and you need something server side to respond to that cookie and display the
    dynamic change to your users.

    --
    +mrcakey
    www.dreamberry.co.uk
     
    +mrcakey, Mar 5, 2009
    #11
  12. Ioannis wrote:

    > Many thanks, guys. Adding one bit of missing info: I need this so that
    > OTHERS can see if I am online, not me.


    Well, that's a whole 'nother kettle of fish.

    Neither my correct way, nor Awful's incorrect way will help you then.
    You should have said that at the very beginning of your quest.

    --
    -bts
    -Friends don't let friends drive Windows
     
    Beauregard T. Shagnasty, Mar 5, 2009
    #12
  13. Ioannis

    Ioannis Guest

    +mrcakey wrote:
    > "Ioannis" <> wrote in message
    > news:1236283437.719385@athprx04...
    > <snip>
    >>
    >> Many thanks, guys. Adding one bit of missing info: I need this so that
    >> OTHERS
    >> can see if I am online, not me.
    >>
    >> Now, _I think_ but I am not sure, that I'd also need a bit of "if"
    >> branching
    >> with javascript.
    >>
    >> For example,
    >>
    >> if IP = mine, then display some hardwired html code on the page: "Author
    >> online"
    >> else display some hardwired html code: "Author offline".
    >>
    >> For example, the default would be: "Author offline".
    >>
    >> As soon as I visit my own page, the hardwired html part can change to
    >> "Author
    >> online" so that a visitor can see that, if he visits the page after my
    >> visit.
    >>
    >> My apologies if the above is utter stupidity. I am not even sure if it
    >> will
    >> work!
    >>
    >> Many thanks again!
    >> --
    >> Ioannis

    >
    > Like I said earlier, having actually read and understood your requirement,
    > you need cookie processing (or a login) to detect when you're on your site
    > and you need something server side to respond to that cookie and display the
    > dynamic change to your users.


    Yes, thank you, I understood that you understood, unfortunately I am fairly
    clueless to all that.

    If you could be more specific, I'd be glad to credit you with the solution, if
    you could provide it.

    Login is out, so I'd be glad to hear how cookie processing would work, if you
    care to explain.
    --
    Ioannis
    "There's _always_ a mistake, somewhere."
    --- Addednum to Murphy's Laws #314.
     
    Ioannis, Mar 5, 2009
    #13
  14. Ioannis

    Ioannis Guest

    Beauregard T. Shagnasty wrote:
    > Ioannis wrote:
    >
    >> Many thanks, guys. Adding one bit of missing info: I need this so that
    >> OTHERS can see if I am online, not me.

    >
    > Well, that's a whole 'nother kettle of fish.
    >
    > Neither my correct way, nor Awful's incorrect way will help you then.
    > You should have said that at the very beginning of your quest.


    My apologies. I somehow made the stupid assumption that if I could detect
    whether I am online, others would be able to.
    --
    Ioannis
    "There's _always_ a mistake, somewhere."
    --- Addednum to Murphy's Laws #314.
     
    Ioannis, Mar 5, 2009
    #14
  15. Ioannis

    +mrcakey Guest

    "Beauregard T. Shagnasty" <> wrote in message
    news:gopcsi$164$...
    > Ioannis wrote:
    >
    >> Many thanks, guys. Adding one bit of missing info: I need this so that
    >> OTHERS can see if I am online, not me.

    >
    > Well, that's a whole 'nother kettle of fish.
    >
    > Neither my correct way, nor Awful's incorrect way will help you then.
    > You should have said that at the very beginning of your quest.
    >


    He did - "Is there any online html code thingy that would allow me to show
    on my web page
    if I am online? Only ME, the author of the web page."

    --
    +mrcakey
     
    +mrcakey, Mar 5, 2009
    #15
  16. Ioannis

    +mrcakey Guest

    "Ioannis" <> wrote in message
    news:1236285438.228916@athprx04...
    > +mrcakey wrote:
    >> "Ioannis" <> wrote in message
    >> news:1236283437.719385@athprx04...
    >> <snip>
    >>>
    >>> Many thanks, guys. Adding one bit of missing info: I need this so that
    >>> OTHERS
    >>> can see if I am online, not me.
    >>>
    >>> Now, _I think_ but I am not sure, that I'd also need a bit of "if"
    >>> branching
    >>> with javascript.
    >>>
    >>> For example,
    >>>
    >>> if IP = mine, then display some hardwired html code on the page: "Author
    >>> online"
    >>> else display some hardwired html code: "Author offline".
    >>>
    >>> For example, the default would be: "Author offline".
    >>>
    >>> As soon as I visit my own page, the hardwired html part can change to
    >>> "Author
    >>> online" so that a visitor can see that, if he visits the page after my
    >>> visit.
    >>>
    >>> My apologies if the above is utter stupidity. I am not even sure if it
    >>> will
    >>> work!
    >>>
    >>> Many thanks again!
    >>> --
    >>> Ioannis

    >>
    >> Like I said earlier, having actually read and understood your
    >> requirement,
    >> you need cookie processing (or a login) to detect when you're on your
    >> site
    >> and you need something server side to respond to that cookie and display
    >> the
    >> dynamic change to your users.

    >
    > Yes, thank you, I understood that you understood, unfortunately I am
    > fairly
    > clueless to all that.
    >
    > If you could be more specific, I'd be glad to credit you with the
    > solution, if
    > you could provide it.
    >
    > Login is out, so I'd be glad to hear how cookie processing would work, if
    > you
    > care to explain.
    > --
    > Ioannis


    The fundamental thing is that to change your web page you need to be able to
    do some manipulation of the HTML output server side, for instance with PHP.
    This would need to be triggered by an event that indicated you were online.
    That event could be for instance:

    - a log in,
    - detecting a cookie or
    - detecting your own IP address if you have a static IP (least reliable
    since the HTTP header that carries this information is easily spoofed)

    If you want to implement/learn some server side scripting then that is your
    solution. If not, there isn't a solution I'm afraid!

    --

    +mrcakey
    www.dreamberry.co.uk
     
    +mrcakey, Mar 5, 2009
    #16
  17. Ioannis

    Ioannis Guest

    +mrcakey wrote:
    [snip]

    > The fundamental thing is that to change your web page you need to be able to
    > do some manipulation of the HTML output server side, for instance with PHP.
    > This would need to be triggered by an event that indicated you were online.
    > That event could be for instance:
    >
    > - a log in,
    > - detecting a cookie or
    > - detecting your own IP address if you have a static IP (least reliable
    > since the HTTP header that carries this information is easily spoofed)
    >
    > If you want to implement/learn some server side scripting then that is your
    > solution. If not, there isn't a solution I'm afraid!


    I understand the principle behind the cookie method a little better, so I will
    try to investigate that. I don't understand how this method could detect when I
    am "leaving" my web site, though. Isn't that a bit unreliable?

    Thanks again,
    --
    Ioannis
    "There's _always_ a mistake, somewhere."
    --- Addendum to Murphy's Laws #314.
     
    Ioannis, Mar 5, 2009
    #17
  18. +mrcakey wrote:

    > "Beauregard T. Shagnasty" wrote:
    >> Ioannis wrote:
    >>> Many thanks, guys. Adding one bit of missing info: I need this so
    >>> that OTHERS can see if I am online, not me.

    >>
    >> Well, that's a whole 'nother kettle of fish.
    >>
    >> Neither my correct way, nor Awful's incorrect way will help you
    >> then. You should have said that at the very beginning of your quest.

    >
    > He did - "Is there any online html code thingy that would allow me to
    > show on my web page if I am online? Only ME, the author of the web
    > page."


    I interpreted it as: "[Show] Only ME, the author of the web page."

    --
    -bts
    -Friends don't let friends drive Windows
     
    Beauregard T. Shagnasty, Mar 5, 2009
    #18
  19. Gazing into my crystal ball I observed "Ioannis" <>
    writing in news:1236289754.475779@athprx04:

    > +mrcakey wrote:
    > [snip]
    >
    >> The fundamental thing is that to change your web page you need to be
    >> able to do some manipulation of the HTML output server side, for
    >> instance with PHP. This would need to be triggered by an event that
    >> indicated you were online. That event could be for instance:
    >>
    >> - a log in,
    >> - detecting a cookie or
    >> - detecting your own IP address if you have a static IP (least
    >> reliable since the HTTP header that carries this information is
    >> easily spoofed)
    >>
    >> If you want to implement/learn some server side scripting then that
    >> is your solution. If not, there isn't a solution I'm afraid!

    >
    > I understand the principle behind the cookie method a little better,
    > so I will try to investigate that. I don't understand how this method
    > could detect when I am "leaving" my web site, though. Isn't that a bit
    > unreliable?
    >
    > Thanks again,


    Leaving a site is always seems to be a bit of a problem server side.
    One does not know if the user timed out, closed the page, closed the
    browser, etc. The only way to really know what happened is if the user
    specifically logs out. One can use javascript to detect if the client
    is still there, and if there is no response within a certain time,
    javascipt removes the session server side.

    --
    Adrienne Boswell at Home
    Arbpen Web Site Design Services
    http://www.cavalcade-of-coding.info
    Please respond to the group so others can share
     
    Adrienne Boswell, Mar 5, 2009
    #19
  20. On 05 Mar 2009, "Beauregard T. Shagnasty" <>
    wrote:

    > Awful Dog Autry wrote:
    >
    >> "Beauregard T. Shagnasty" wrote:


    >>> and it does not contain the IP but rather obviously the
    >>> HTTP_REFERER (the page you came from).

    >>
    >> Look up Ip on Google. Here's my first result (data modified)

    >
    > I know what an IP is. Google returns 652,000,000 results for "IP"
    >
    >> HTTP_REFERER *IS* the ip address.

    >
    > Not on my planet. It is the URL of the page that 'refered' you to the
    > page collecting the information.


    Ok, you're right. I was mistaking "address" for "ip address" and, of
    course, they're not the same.

    > Read that again carefully. "The address of the page" as in .. what
    > is the address of a page? It's the URL.


    Yep.

    > I have a test page for you.
    > http://tekrider.net/usenet/referer.php
    >
    > It will lead you to another page of mine at a different domain that
    > shows both your IP address and the HTTP_REFERER from the calling
    > page, using this:
    >
    > $ip = gethostbyname($_SERVER['REMOTE_ADDR']);
    > $referer = $_SERVER['HTTP_REFERER'];


    BION, I made a page very similar to that myself once.

    --
    Awful Dog Autry
     
    Awful Dog Autry, Mar 6, 2009
    #20
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jesse Liberty
    Replies:
    2
    Views:
    319
  2. =?Utf-8?B?RXJpYw==?=

    Change file summary (title, author, etc.)

    =?Utf-8?B?RXJpYw==?=, Oct 11, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    9,232
    Paul Clement
    Oct 12, 2005
  3. Vince C.
    Replies:
    4
    Views:
    2,253
    Vince C.
    Jul 3, 2003
  4. Nospam
    Replies:
    21
    Views:
    2,144
    Guy Macon
    Sep 11, 2005
  5. Replies:
    2
    Views:
    507
Loading...

Share This Page