Solved

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

Posted on 1997-06-07
2
209 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
2 Comments
 
LVL 5

Accepted Solution

by:
icd earned 80 total points
Comment Utility
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
Comment Utility
Edited text of question
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

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…
It is a general practice to get rid of old user profiles on a computer  in a LAN environment. As I have been working with a company in a LAN environment where users move from one place to some other place at times. This will make many user profil…
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now