Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Author Online Tracker?

Reply
Thread Tools

Author Online Tracker?

 
 
Ioannis
Guest
Posts: n/a
 
      03-02-2009
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".

 
Reply With Quote
 
 
 
 
+mrcakey
Guest
Posts: n/a
 
      03-02-2009
"Ioannis" <(E-Mail Removed)> 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


 
Reply With Quote
 
 
 
 
richard
Guest
Posts: n/a
 
      03-04-2009
On Mon, 2 Mar 2009 12:33:51 +0200, "Ioannis" <(E-Mail Removed)>
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.
 
Reply With Quote
 
Harlan Messinger
Guest
Posts: n/a
 
      03-04-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?


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.
 
Reply With Quote
 
Awful Dog Autry
Guest
Posts: n/a
 
      03-04-2009
On 02 Mar 2009, "Ioannis" <(E-Mail Removed)> 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
 
Reply With Quote
 
Beauregard T. Shagnasty
Guest
Posts: n/a
 
      03-04-2009
Awful Dog Autry wrote:

> "Ioannis" <(E-Mail Removed)> 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
 
Reply With Quote
 
Awful Dog Autry
Guest
Posts: n/a
 
      03-05-2009
On 04 Mar 2009, "Beauregard T. Shagnasty" <(E-Mail Removed)>
wrote:

> Awful Dog Autry wrote:
>
>> "Ioannis" <(E-Mail Removed)> 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
 
Reply With Quote
 
Ioannis
Guest
Posts: n/a
 
      03-05-2009
Awful Dog Autry wrote:
> On 04 Mar 2009, "Beauregard T. Shagnasty" <(E-Mail Removed)>
> wrote:
>
>> Awful Dog Autry wrote:
>>
>>> "Ioannis" <(E-Mail Removed)> 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.

 
Reply With Quote
 
Beauregard T. Shagnasty
Guest
Posts: n/a
 
      03-05-2009
Awful Dog Autry wrote:

> "Beauregard T. Shagnasty" wrote:
>> Awful Dog Autry wrote:
>>> "Ioannis" <(E-Mail Removed)> 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
 
Reply With Quote
 
John Hosking
Guest
Posts: n/a
 
      03-05-2009
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...ger_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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Interview with Rickford Grant, Author of "Linux Made Ea Silverstrand Front Page News 0 09-15-2005 11:47 PM



Advertisments