?
Solved

How to detect RELOAD in cgi? and how to get the date in cgi?

Posted on 1997-06-07
2
Medium Priority
?
222 Views
Last Modified: 2013-12-25
Except these two questions, I also want to know if there is a way to figure out who *are* currently on my page. (say
currently several people are visiting my page, I want to
figure out who they are).

About RELOAD, I want to detect if someone click on the
"RELOAD" button in cgi, as to date, if you can help, please
give details in how to get the date in my cgi, say
(currentTime = date(...) or something else)
0
Comment
Question by:carrot
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 5

Accepted Solution

by:
icd earned 80 total points
ID: 1828187
Two of these questions are related. How to detect a reload and how to find out who has loaded your page.

You can access an environment variable 'REMOTE_ADDR', in perl this would be $ENV{'REMOTE_ADDR'}

This will tell you the address of the person loading the page. By logging every page accessed and by whom you can detect reloads (i.e. a particular page has been loaded by someone who loaded it earlier on in the day).

The REMOTE_ADDR however is not very useful since you cannot always relate it to a particular person. If however you insist that anyone using your site provides a user name and password (by using the .htaccess method on UNIX for example) then you have access to environment variable REMOTE_USER which is more useful.

To get the date you can use the (UNIX) date command.


0
 

Author Comment

by:carrot
ID: 1828188
Edited text of question
0

Featured Post

Quick Cloud Training

Looking for some quick training on the cloud in 2 hours or less? Check out these how-to guides in AWS, Linux, OpenStack, Azure, and more!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you get a (Blue Screen of Death), your system writes a small file called a minidump. Your first step is to make certain your computer is setup to record memory dumps. Right click My Computer, choose properties. Click on the advanced tab, an…
In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
The viewer will learn how to count occurrences of each item in an array.
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question