½ÃÀÛÆäÀÌÁö·Î Áñ°Üã±âÃß°¡
·Î±×ÀÎ
ȸ¿ø°¡ÀÔ l Ã⼮üũ l ¸¶ÀÌÆäÀÌÁö l CGIMALL
ÀÚ·á½Ç »çÀÌÆ®µî·Ï ·©Å·100 ÇÁ·Î±×·¥¸®ºä °ü¸®ÀÚÃßõÀÚ·á Ãʺ¸°¡À̵å
Ä¿¹Â´ÏƼ
Àüü ÆîÃ帱â
Äü¸Þ´º¸µÅ© jquery , CSS , PHP , Javascript , ¹«·áÆùÆ® , ASP
»ó¼¼°Ë»ö
Ȩ > Ä¿¹Â´ÏƼ > Áú¹®°ú´äº¯ »ó¼¼º¸±â
Ä¿¹Â´ÏƼ ±¸Àα¸Á÷
»çÀÌÆ®µî·Ï
Ŭ¶ó¿ìµåű×
Javascript
PHP
asp
CSS
html
mysql
jquery
image
Mobile
API
slide
°Ô½ÃÆÇ
¸Þ´º
ÇöÀçÁ¢¼ÓÀÚ ¸í »õ·Î°íħ
°Ô½ÃÆÇŸÀÌƲ Áú¹®°ú´äº¯ / »ó¼¼º¸±â
Æ®À§ÅÍ·Î º¸³»±â
Ãßõ¼ö 166 | Á¶È¸¼ö 2,328 | µî·ÏÀÏ 2004-01-29 12:58:22

´Ð³×ÀÓ

nasanet

À̸ÞÀÏ

nasanet@hanmail.net

Á¦¸ñ

cgi ¼Ò½º ¼öÁ¤Á» ÇØÁֽǼö¾ø³ª¿ä?
³»¿ë

¾È³çÇϼ¼¿ä...¹Ý°©½À´Ï´Ù.
À̹ø¿¡ Á¤ÅëºÎ¿¡¼­ ¹ßÇ¥ÇÑ ¿ìÆí¹øÈ£¸¦ °¡Áö°í ¿ìÆí¹øÈ£db¸¦ ¸¸µé¾î´Âµ¥...
ã±â¸¦ ÇÏ¸é ¾Ê³ª¿À´Â ÁÖ¼Ò°¡ ÀÖ½À´Ï´Ù.
±×·¡¼­ ¿Ö±×·±Áö ã´Ùº¸´Ï ¿ìÆí¹øÈ£°¡ °°Àº°Ô ÀÖÀ¸¸é ÇϳªÀÇ ÁÖ¼Ò¸¸ ³ª¿À´Â°ÍÀÔ´Ï´Ù.
¿¹À» µé¾î "¿Âõ3µ¿"¸¦ °Ë»öÇÏ¸é ¿ìÆí¹øÈ£db¿¡´Â 21°³°¡ Àִµ¥ °Ë»öÀº 10°³¸¸µË´Ï´Ù.
±×·¡¼­ ¿øÀÎÀ» ã¾Æº¸´Ï ¿ìÆí¹øÈ£°¡ µ¿ÀÏÇÏ¸é °Ë»ö¿¡¼­ Çϳª¸¸ ³ª¿À°í ³ª¸ÓÁö ÁÖ¼Ò´Â
³ª¿ÀÁö ¾Ê´Â°ÍÀÔ´Ï´Ù.
µ¿ÀÏÇÑ ¿ìÆí¹øÈ£°¡ ÀÖÀ¸¸é ÁÖ¼ÒÁß Çϳª¸¸ Ãâ·ÂÇϴ°ÍÀÔ´Ï´Ù.
°£´ÜÇÏ°Ô ¼öÁ¤ ÇÒ¼ö¾ø³ª¿ä?

http://www.oktnt.com/Fmail/aaa/zip/zipcode.cgi

¼Ò½º´Â ¹Ø¿¡ ÷ºÎÇصξú½À´Ï´Ù.

±×·³ ºÎŹÁ» µå¸²´Ï´Ù....
°¨»çÇÕ´Ï´Ù.

 

#!/usr/bin/perl

##############################################################
# ¿ìÆí¹øÈ£ °Ë»ö
# geonex@hanmail.net
##############################################################


&init;

if($GIL{'mode'} eq '') { &print_top; }
elsif($GIL{'mode'} eq 'top') { &show_top; }
elsif($GIL{'mode'} eq 'down') { &show_down; }
elsif($GIL{'mode'} eq 'search') { &search; }

 

##########################################################################
sub search {

        my $query = $GIL{'query'};

print "Content-type: text/html\n\n";
print<<END;
<html>
<head>
<SCRIPT language="JavaScript">
function Copy(zip1,zip2,address) {
        // copy
        top.opener.document.$GIL{form}.$GIL{zip1}.value = zip1;
        top.opener.document.$GIL{form}.$GIL{zip2}.value = zip2;
        top.opener.document.$GIL{form}.$GIL{address}.value = address;

        // focus
        top.opener.document.$GIL{form}.$GIL{address}.focus();

        // close this window
        parent.window.close();

}
</SCRIPT>
<TITLE>Ƽ»çƼ ¿ìÆí¹øÈ£ °Ë»ö</TITLE>
</head>
<style type="text/css">
<!--
body {font-family:±¼¸²Ã¼; font-size:12px; text-decoration:none }
td { font-family:±¼¸²Ã¼; font-size:12px; text-decoration:none}
        a:link { font-family:±¼¸²Ã¼; font-size:12px; text-decoration:none; color:black}
a:visited { font-family:±¼¸²Ã¼; font-size:12px; text-decoration:none; color:black}
a:hover { text-decoration: underline; color=#ff0000}
-->
</style>
<body bgcolor=white text=#000000>
<font size=2>
<center>
<table cellspacing=0 cellpadding=6 width=100%>
<tr align=center BGCOLOR=#4c81c><td><font size=-1><b>¿ìÆí¹øÈ£</b></font></td><td><font size=-1><b>ÁÖ ¼Ò</b></font></td><td><font size=-1><b>È®ÀÎ</b></font></td></tr>

END

        require 'zipcode.pm';

        if($GIL{searchmode} eq 'address') {
                $ref = &zipcode_address($query);
        } elsif($GIL{searchmode} eq 'code') {
                $ref = &zipcode_code($query);
        }

        for(sort keys %$ref) {
                my ($zip1, $zip2) = $_ =~ /(...)(...)/;
                print qq|<tr BGCOLOR="#C3E5FF"><form><td><font color=black><input type='text' name='zip1' value='$zip1' size=3><b>-</b><input type='text' name='zip2' value='$zip2' size=3></font></td>
                                <td><input type='text' name='address'
value='$$ref{$_}' size=40 maxlength=50><br></font></td><td><input
type="button" value="Àû¿ë" onClick="Copy('$zip1','$zip2','$$ref{$_}')"></td></form></tr>|;
        }

print <<END;

</table>
</font>

<hr size=1><center>
<font size=2 color=red><b>°Ë»öÀÌ ¿Ï·áµÇ¾ú½À´Ï´Ù.</b></font></center>
<hr size=1>
<FORM action=zipcode.cgi method=post name=gil>
<input type=hidden name=mode value=search>

<input type=hidden name=form value=$GIL{form}>
<input type=hidden name=zip1 value=$GIL{zip1}>
<input type=hidden name=zip2 value=$GIL{zip2}>
<input type=hidden name=address value=$GIL{address}>

<font size=2 color=#404040>
°Ë»ö¾î: <input type=text name=query size=15>
<select name=searchmode size=1 onChange=document.gil.query.focus()>
<option value=address>ÁּҷΠã±â
<option value=code>¿ìÆí¹øÈ£·Î ã±â
</select>
<input type=submit value="°Ë»ö">
</FORM>
</body>
</html>

END

}


##########################################################################
sub print_top {
print "Content-type: text/html\n\n";
print<<END;
<html>
<head>
<SCRIPT language="JavaScript">
</SCRIPT>
<TITLE>Ƽ»çƼ ¿ìÆí¹øÈ£°Ë»ö</TITLE>
</head>
<body bgcolor=white text=#000000 onLoad=document.gil.query.focus()>
<center>
<TABLE Width=400 CelLSpacing=0 CellPadding=6 Border=1 BorderColor=Black>
<TR>
   <TD BGCOLOR="gold" align="center">  <Font Size=2 Color=black>
<b>¿ìÆí¹øÈ£/ÁÖ¼Ò °Ë»ö</b>
   </TD>
</TR>

<TR>
   <TD> <Font Size=2>

   <BR><CENTER>
<FONT SIZE=2 FACE="±¼¸²Ã¼,arial">     ã°íÀÚ ÇÏ´Â ÁÖ¼ÒÀÇ µ¿/À¾/¸é À̸§À» ÀÔ·ÂÇϼ¼¿ä.<br>     (¿¹:¾Ð±¸Á¤µ¿/´Ü¾çÀ¾/¼ö»ê¸é)</FONT>
<hr size=1>
<FORM action=zipcode.cgi method=post name=gil>
<input type=hidden name=mode value=search>

<input type=hidden name=form value=$GIL{form}>
<input type=hidden name=zip1 value=$GIL{zip1}>
<input type=hidden name=zip2 value=$GIL{zip2}>
<input type=hidden name=address value=$GIL{address}>

<font size=2 color=#404040>
°Ë»ö¾î: <input type=text name=query size=15>
<select name=searchmode size=1 onChange=document.gil.query.focus()>
<option value=address>ÁּҷΠã±â
<option value=code>¿ìÆí¹øÈ£·Î ã±â
</select>
<input type=submit value="°Ë»ö">
</FORM>
      </TD>
   </TR>
   </TABLE>
</center>
</body>
</html>

END

}

 

 

##########################################################################
sub init {
        if ($ENV{'REQUEST_METHOD'} eq "POST") { read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); }
        else { $buffer = $ENV{'QUERY_STRING'}; }

        for (split '&', $buffer) {
                my ($name, $value) = split '=';
                $name =~ tr/+/ /;  $name =~ s/%(..)/chr(hex($1))/ge;
                $value =~ tr/+/ /;  $value =~ s/%(..)/chr(hex($1))/ge;
                $GIL{$name} = $value;
        }

}


__END__

Ãßõ½ºÅ©·¦¼Ò½ºº¸±â ¸ñ·Ï
ÀÌÀü°Ô½Ã±Û [¿äû] ÀÚ·á »èÁ¦¸¦ ºÎŹµå¸³´Ï´Ù. 2004-01-29 09:02:54
´ÙÀ½°Ô½Ã±Û Homepage + Money =PoorMoney ¹Ìµð¾î È­ÀÏ ¾÷·Îµå´Â ¾ÈµÇ³ª¿ä.. ? 2004-01-29 17:37:52