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

How can a function return a pointer to its calling routine, How can a funct...

How can a function return a pointer to its calling routine? The general form of a function is: type_specifier function_name(parameter list) { body of function; }

State about dynamic modelling and its inputs, State about Dynamic modelling...

State about Dynamic modelling and its inputs Dynamic modelling is elaborated further by adding concept of time: new attributes are computed, as a function of the attribute chan

What is multiprogramming, Multiprogramming is a rapid switching of the CPU ...

Multiprogramming is a rapid switching of the CPU back and forth among processes.

Weighted harmonic mean and geometric mean, Problem Show which of the w...

Problem Show which of the weighted arithmetic mean, geometric mean or harmonic mean, you would use in each of the following case. Justify your answer in each case. (a)

Explain applications of parallel processing, APPLICATIONS OF PARALLEL PROCE...

APPLICATIONS OF PARALLEL PROCESSING Parallel computing is an development of sequential computing which tries to emulate what has always been the condition of affairs in natural

Optimality - heuristic search strategies, Optimality - Heuristic search str...

Optimality - Heuristic search strategies: The path cost of a solution is considered as the sum of the costs of the actions that led to which solution is given. This is only on

Contraposition, Contraposition : The contraposition equivalence is as ...

Contraposition : The contraposition equivalence is as follows:  So it may seem a small strange at first, this means that it appears which we have said nothing in the f

What is recursing downwards, What is recursing downwards? And its ways. ...

What is recursing downwards? And its ways. The design process generally works top-down; you start with the higher level operations and proceed to describe lower level operation

What is an compiled languages, What is an compiled languages In compile...

What is an compiled languages In compiled languages the instructions into machine code and kept them  in a separate file for later implementation. Many modern compilers can com

Use of arrays in assembly, An array is referencing using a base array value...

An array is referencing using a base array value as well as an index. To simplify addressing in arrays 8086 has provided two index registers for mathematical computations viz. BP a

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