★ wanayoo — archive 1999 http://www.webtechniques.com/sourcecode/1997/09/webm/1.lstNouvelle recherche | Portail wanayoo

 
| home | current issue | archives | source code | events | demo express | search | editorial calendar | advertising | customer service | author guidelines | jobs | about

S O U R C E   C O D E / 1997 / 09 / webm / 1.lst


01  $COUNTER++;
02 
03  my $r = Apache->request;
04  my $remote_browser = $r->header_in('User-Agent');
05  my $connection = $r->connection();
06  my $remote_host = $connection->remote_host() ||
07      $connection->remote_ip();
08  output($r,$remote_host,$remote_browser);
09  
10  sub output {
11      my ($r,$host,$browser) = @_;
12      $r->content_type("text/html");
13      $r->send_http_header();
14      $r->print(<<END);
15  <HTML><HEAD><TITLE>Simple Test</TITLE></HEAD>
16  <BODY>
17  <H1>Simple Test</H1>
18  Hello.  I see that you are using the <I>$browser</I> browser and are
19  calling from <I>$host</I>.
20  <P>
21  Did you realize that this script has been called
22  <STRONG>$COUNTER</STRONG> times (process ${$})?
23  <HR>
24  </BODY>
25  </HTML>
26  END
27      ;
28  }


| home | current issue | archives | source code | demo express | events | search | editorial calendar | advertising | customer service | author guidelines | jobs | about




Entire contents copyright 1996-2000 CMP Media Inc.
Read our privacy policy.