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

Environments -artificial intelligence, Environments: We have seen that...

Environments: We have seen that an agents intelligent should take into account certain information when it choose a rational action, including information from its sensors, in

What is a kernel shell, A shell is a program that presents an interface to ...

A shell is a program that presents an interface to several operating system functions and services. The shell is so called because it is an outer layer of interface among the user

Telnet services, java program for implementation of telnet services

java program for implementation of telnet services

Distinguish between http and true streaming, Question: 1. Distinguish ...

Question: 1. Distinguish between HTTP and True streaming, stating the advantages and disadvantages of both type of media streaming. 2. Name two online services which provi

Sap security audit log, You are required to use software of your choice (sp...

You are required to use software of your choice (spreadsheet, database, statistical package etc) to analyze the provided SAP security audit log data ( Userdata.xls ), generate appr

Explain program interpretation process, Explain program interpretation pr...

Explain program interpretation process. In a program interpretation process , the interpreter reads the source program and stores this in its memory. This bridges an executi

What is the linkage section used for, The linkage section is used to pass d...

The linkage section is used to pass data from one program to one more program or to pass data from a PROC to a program.

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