Leser: 2
![]() |
|< 1 2 >| | ![]() |
13 Einträge, 2 Seiten |
06: use CGI qw/:standard/;
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
#!/usr/bin/perl use HTTP::Daemon; use HTTP::Status; use strict; use CGI qw/:standard/; my $My_IP = 'localhost'; my $Name = "HTTP Server"; my $d = HTTP::Daemon->new( LocalHost => $My_IP, LocalPort => 3002, ); die "$Name: Socket konnte nicht erstellt werden - Grund: $!\n" unless $d; print " $Name läuft auf : <", $d->url, ">\n"; while (my $c = $d->accept) { while (my $r = $c->get_request) { if ($r->method eq 'GET') { my $rs = new HTTP::Response(RC_OK); $rs->content(CGI::start_html(-title=>' Anzeige ')); $rs->add_content(CGI::start_form); $rs->add_content("Nr: " . CGI::textfield(-name=>'Nummer',-size=>30) . "ID: " . CGI::textfield(-name=>'Zuordnung', -size=>30)); $rs->add_content(CGI::submit(-value=>'Zuweisen') . CGI::submit(-value=>'Löschen') ); $rs->add_content(CGI::end_form . CGI::hr . CGI::end_html); $c->send_response($rs); } else { $c->send_error(RC_FORBIDDEN) } } $c->close; undef($c); }
$rs->header( 'Expires' => 0 );
$rs->header( 'Expires' =>'Thu, 03 Feb 1994 00:00:00 GMT';
![]() |
|< 1 2 >| | ![]() |
13 Einträge, 2 Seiten |