¾È³çÇϼ¼¿ä. ÇØÇÇ CGI À±¿µ¿õÀÔ´Ï´Ù. html°ú CGI°¡ ¾à°£ ÀÌ»óÀÌ ÀÖ¾ú±º¿ä. html¿¡¼ input type=text name=url ·Î ¼öÁ¤À» Çϼ¼¿ä. ±×¸®°í CGI´Â ¾Æ·¡¸¦ ´Ù½Ã ºÙÀ̼¼¿ä. #!/usr/bin/perl unless ($ENV{ CONTENT_LENGTH } eq "") { read(STDIN, $buffer, $ENV{ CONTENT_LENGTH }); }
@pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/ / /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $INFO{$name} = $value; } print "Location: $INFO{ url }
"; ÁÁÀº ÇÏ·çµÇ¼¼¿ä.
|