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

Payroll pc, Purpose: Payroll processing and storage for the client database...

Purpose: Payroll processing and storage for the client database (accessed from the Reception-PCover the network),word processing (reports etc.) and spreadsheets. Software: . • W

Device controllers, All components of computer communicate with processor b...

All components of computer communicate with processor by the system bus. Which means I/O devices required to be attached to system bus. But I/O devices aren't connected directly to

Cache simulater, Requirements You are required to program (in a high l...

Requirements You are required to program (in a high level language such as C, C++, Java) and implement a cache simulator which will have the following inputs and outputs:-

What do you mean by memory mapped i/o, What do you mean by memory mapped I/...

What do you mean by memory mapped I/O? In Memory mapped I/O, there is no particular input or output instructions. The CPU can manipulate I/O data residing in interface register

Targeting for new business, Assume you own your own small party supply and ...

Assume you own your own small party supply and rental business. You keep an Excel list of potential customers and clients who have rented or purchased from you in the past 2 years.

Smli firewalls are different from the conventional, SMLI firewalls are diff...

SMLI firewalls are different from the conventional The SMLI firewalls are different from the conventional "stand in" proxies in a way that the stand-in proxies are used for th

Explain the handshaking signals, a. Explain the hardware mechanism for hand...

a. Explain the hardware mechanism for handling multiple interrupt requests. b. What are handshaking signals? Describe the handshake control of data transfer during input and out

Sound and complete, Dictator Dim wants to replace counting, in particular, ...

Dictator Dim wants to replace counting, in particular, counting the population of his land. To keep an accurate population count, Dictator Dim has instructed his secretary to add o

What are the address-sequencing capabilities, What are the address-sequenci...

What are the address-sequencing capabilities required in a control memory? i. Incrementing the control address register ii. Unconditional branch as specified by address fiel

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