Velocity Reviews - Computer Hardware Reviews

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

Reply
Thread Tools

Author Online Tracker?

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


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

 
Reply With Quote
 
Ioannis
Guest
Posts: n/a
 
      03-05-2009
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.

 
Reply With Quote
 
+mrcakey
Guest
Posts: n/a
 
      03-05-2009
"Beauregard T. Shagnasty" <(E-Mail Removed)> wrote in message
news:gopcsi$164$(E-Mail Removed)...
> 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


 
Reply With Quote
 
+mrcakey
Guest
Posts: n/a
 
      03-05-2009
"Ioannis" <(E-Mail Removed)> wrote in message
news:1236285438.228916@athprx04...
> +mrcakey wrote:
>> "Ioannis" <(E-Mail Removed)> 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


 
Reply With Quote
 
Ioannis
Guest
Posts: n/a
 
      03-05-2009
+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.

 
Reply With Quote
 
Beauregard T. Shagnasty
Guest
Posts: n/a
 
      03-05-2009
+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
 
Reply With Quote
 
Adrienne Boswell
Guest
Posts: n/a
 
      03-05-2009
Gazing into my crystal ball I observed "Ioannis" <(E-Mail Removed)>
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

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