Write a cgi program that keeps a list of computers, Computer Engineering

Assignment Help:

Write a CGI program that keeps a list of computers that have contacted the server. If comp1 is contacting first time it will display the message:

"This is the first contact from comp1" else it will display the message

"Computer comp1 has requested this URL previously."

A CGI program which has a list of computers which have contacted the server is as given below:

#!/bin/sh

FILE = ipaddress

echo Content -type: text /plain

echo

# see if IP address computer appears in file ip address

if grep -s $REMOTE_ADDR $FILE>/dev/nul l 2 >&1

then

echo Computer $REMOTE_ADDR has requested this URL previously.

else

# append browser's address to the file

echo $REMOTE_ADDR >> $FILE

echo This is the first contact from computer $REMOTE_ADDR.


Related Discussions:- Write a cgi program that keeps a list of computers

Find blocking probably in 100-line strowger switching system, Calculate the...

Calculate the blocking probably Pb in 100 line strowger switching system where 10 calls are in progress and 11th one arrives, probably that there is a call in a given decade = 1/10

What are the two aspects of locality of reference, What are the two aspects...

What are the two aspects of locality of reference? Define them. Two aspects of locality of reference are temporal aspects and spatial aspect. Temporal aspect is that a r

What are assembly attributes, Attributes are declarative tags in code that ...

Attributes are declarative tags in code that put in additional metadata into an assembly.

What is meant by Wired-AND connection of digital ICs, What is meant by Wire...

What is meant by Wired-AND connection of digital ICs?                                                                                                               Ans: Wir

What is a heap dump, Thread Dump: When we trigger a thread dump on an appli...

Thread Dump: When we trigger a thread dump on an application server, all active thread informations will be deserted into file which is called as thread dump. Here, we can get info

Translation table encryption technique to secure transaction, Discuss about...

Discuss about Translation table encryption technique to ensure secured transactions onto the net? Translation table: In this process each chunk of data is used like an of

Benefits of device controllers, Q. Benefits of Device controllers? Usin...

Q. Benefits of Device controllers? Using device controllers for attaching I/O devices to a computer system in place of connecting them directly to system bus has subsequent ben

Data structure, Process: pid start time end time priority t...

Process: pid start time end time priority timeslice list of CPU bursts list of IO bursts (the number of IO burst will always be 1 less than the number of CPU

Binary search tree in the descending order, In order to get the information...

In order to get the information kept in a Binary Search Tree in the descending order, one should traverse it in which of the following order?    Right, Root, Left

Determine about the memory stack, Memory Stack Stack could exist as a s...

Memory Stack Stack could exist as a stand-alone unit or could be executed in a random-access memory attached to the CPU. The implementation of a stack in a CPU is done by assig

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd