Solved

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

Posted on 1997-06-07
2
219 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

Stressed Out?

Watch some penguins on the livecam!

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…
A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

707 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