{"id":2136,"date":"2010-03-08T00:23:48","date_gmt":"2010-03-07T15:23:48","guid":{"rendered":"http:\/\/hyunsik.me\/wordpress\/?p=2136"},"modified":"2015-01-31T01:00:25","modified_gmt":"2015-01-30T16:00:25","slug":"asp-%ed%95%b4%ec%99%b8-ip-%ec%a0%91%ec%86%8d-%ec%b0%a8%eb%8b%a8%ed%95%98%ea%b8%b0","status":"publish","type":"post","link":"http:\/\/hyunsik.me\/wordpress\/?p=2136","title":{"rendered":"\ud574\uc678 IP \uc811\uc18d \ucc28\ub2e8\ud558\uae30 With ASP(VB)"},"content":{"rendered":"<p>ASP \uad00\ub828 \uccab \ud3ec\uc2a4\ud305\uc774\ub124\uc694.<br \/>\n\uc0c8\uc0bc \ud504\ub85c\uadf8\ub798\ubc0d \uc5b8\uc5b4\ub97c \uc5ec\ub7ec\uac00\uc9c0 \uc0ac\uc6a9\ud55c\ub2e4\ub294 \uc0ac\uc2e4\uc774 \uacb0\ucf54 \uc26c\uc6b4 \uac83\uc740 \uc544\ub2c8\ub77c\ub294 \uc0ac\uc2e4\uc5d0 \ub300\ud574<br \/>\n\uae4a\uc774 \uc788\uac8c \uae68\ub2eb\uace0 \uc788\ub294 \uc911 \uc785\ub2c8\ub2e4.<\/p>\n<p>\ub450\uac00\uc9c0 \uc774\uc720 \ub54c\ubb38\uc778\ub370\uc694.<br \/>\n1. \ud504\ub85c\uadf8\ub798\ubc0d \uad6c\uc870\uac00 \ub2e4\ub974\ub2e4\ub294 \uac83.<br \/>\n2. \uc2dc\uc2a4\ud15c \ud658\uacbd\uc774 \ub2e4\ub974\ub2e4\ub294 \uac83.<br \/>\n\uc785\ub2c8\ub2e4.<\/p>\n<p>2\ubc88\uc774\uc57c \uc6cc\ub099 \uc2dc\uc2a4\ud15c\uc5d0 \uc57d\ud55c \ud3b8\uc774\uae30\ub3c4 \ud558\uace0,<br \/>\n\ud544\uc694\ud55c \uac83\ub4e4\ub9cc \ucc3e\uc544\uc11c \ud798\uacb9\uac8c \ucc98\ub9ac\ud558\uace0 \uc788\ub294 \uc911\uc774\uae30\uc5d0 \ubb58 \ud574\ub3c4 \uc27d\uc9c0 \uc54a\uc9c0\ub9cc,<br \/>\n1. \ud504\ub85c\uadf8\ub798\ubc0d \uad6c\uc870\uac00 \ub2e4\ub978 \uac83\uc740 \uaf64 \ud070 \ubd80\ubd84\uc774\ub124\uc694.<br \/>\nWindows + IIS + ASP.NET(\ud639\uc740 ASP) + MS-SQL \uc640 Linux + Apache + PHP + MySQL \uc758 \ud658\uacbd\uc758 \ud2b9\uc131\uacfc<br \/>\n\ud504\ub85c\uadf8\ub798\ubc0d \ubc29\ubc95\ub860\uc774 \ucc28\uc774\uac00 \uc788\uc5b4 \ubcf4\uc785\ub2c8\ub2e4.<br \/>\n\uc774\ubc88 \uae30\ud68c\uc5d0 \uc5ec\ub7ec\uac00\uc9c0 \ud658\uacbd\uc5d0 \ub300\ud574 \uc77c\ud558\uba70 \ubd84\uc11d\ud574 \ubcfc \uc608\uc815\uc774\uace0\uc694.<\/p>\n<p>\ud658\uacbd\uc774 \ubc14\ub010\ub2e4\uace0 \ud574\uc11c \ud504\ub85c\uadf8\ub7a8\uc758 \ud004\ub9ac\ud2f0\uac00 \ub2ec\ub77c\uc9c0\uba74 \uc548\ub420\ud150\ub370\uc694.<br \/>\n\uc5ec\ub7ec \ud504\ub85c\uadf8\ub798\ubc0d \uc5b8\uc5b4\uc5d0 \ub530\ub978 \uc5ec\ub7ec\uac00\uc9c0 \ud504\ub85c\uadf8\ub798\ubc0d \ubc29\ubc95\ub860\uc744 \uc775\ud788\uace0, \uac70\ubd80\uac10\uc744 \ub290\ub07c\uc9c0 \uc54a\ub294 \uac83\uc740<br \/>\n\ub300\ub2e8\ud788 \uc911\uc694\ud55c \uc77c\uc774\ub77c\uace0 \uc54c\uace0 \uc788\uace0, \uc5b4\uc90d\uc796\uc740 \uc790\ub9cc\uac10\uc740 \ubc84\ub9ac\uace0 \uc5f4\uc2ec\ud788 \ud574\uc57c \ud560 \uac83 \uac19\uc2b5\ub2c8\ub2e4.<br \/>\n\uc6f9\uc5d0\uc11c\ub294 \ub354 \ub9ce\uc740 \ud658\uacbd\uc744 \uc811\ud574\ubcf4\uc544\uc57c \uc880 \ub354 \uc9c4\uc815\ud55c \uc804\ubb38\uac00\ub77c\ub294 \uc18c\ub9ac\ub97c \ud560 \uc218 \uc788\uc744 \uac83 \uac19\ub124\uc694.<br \/>\n\ubaa8\ub4e0 \ud658\uacbd\uc5d0\uc11c \ud5c8\uc811\ud558\uc9c0 \uc54a\uac8c \uace0\ubc00\ub3c4 \ud504\ub85c\uadf8\ub798\ubc0d\uc744 \ud560 \uc218 \uc788\ub294 \uadf8 \ub0a0\uc774 \uc624\uae30\ub97c \ubc14\ub78d\ub2c8\ub2e4.<\/p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-2143\" title=\"\ud0dc\uadf9\uae30\" src=\"http:\/\/hyunsik.me\/wordpress\/wp-content\/uploads\/2010\/03\/\ud0dc\uadf9\uae30.jpg\" alt=\"\" width=\"379\" height=\"267\" \/><\/p>\n<p>\uc544\ubb34\ud2bc \uc774\ubc88\uc5d0 \uacbd\uc6b0\uc5d0\ub294 <span style=\"color: #0000ff;\">ASP \ud658\uacbd\uc5d0\uc11c \ud574\uc678 IP \uc811\uc18d\uc744 \ucc28\ub2e8\ud574\uc57c \ub420 \uc77c\uc774 \uc788\uc5c8\uace0,<br \/>\n\ub2e4\ud589\ud788\ub3c4 \uc778\ud130\ub137\uc758 \ub3c4\uc6c0\uc744 \uc5bb\uc5b4 \uc27d\uac8c \ud574\uacb0 \ud560 \uc218 \uc788\uc5c8\uae30\uc5d0 \uc774\uc5d0 \ub300\ud55c \ubc29\ubc95\uc744 \uc18c\uac1c<\/span>\ud558\uace0\uc790 \ud569\ub2c8\ub2e4.<br \/>\n\uac80\uc0c9\ud558\ub294\ub370 \uace0\uc0dd\uc744 \ub9ce\uc774 \ud574\uc11c\uc778\uc9c0 \uaf2d \uc368\ub193\uace0 \uc2f6\ub354\ub77c\uace0\uc694. ^^;<\/p>\n<p><a href=\"http:\/\/hyunsik.me\/wordpress\/wp-content\/uploads\/2010\/03\/GeoIP.zip\"><span style=\"color: #339966;\">GeoIP \ub2e4\uc6b4\ub85c\ub4dc<\/span><\/a><br \/>\n\uc704 \ud30c\uc77c\uc740  <a href=\"http:\/\/www.taeyo.pe.kr\/pds\/Content.aspx?SEQ=3187&amp;TBL=UPLOAD&amp;PGN=1\" target=\"_blank\"><span style=\"color: #339966;\">\ud0dc\uc624\uc0ac\uc774\ud2b8\uc758 \uac8c\uc2dc\ud310<\/span><\/a>\uc5d0\uc11c \uc5bb\uc5c8\uace0\uc694, http:\/\/www.maxmind.com\/\u00a0\uc5d0\uc11c\ub3c4 \uc81c\uacf5\ud569\ub2c8\ub2e4.<\/p>\n<p>GeoIP.zip \ud30c\uc77c\uc758 \uc555\ucd95\uc744 \ud480\uba74 4\uac1c\uc758 \ud30c\uc77c\uc774 \uc0dd\uae41\ub2c8\ub2e4.<br \/>\nGeoIP.dat, GeoIPCOM.dll, GeoIPTest.asp, README.txt<br \/>\n(2009\ub144 2\uc6d4 \uae30\uc900\uc758 \ub370\uc774\ud130\uc785\ub2c8\ub2e4. \ucd5c\uc2e0 \ubc84\uc83c\uc740 maxmind.com \uc5d0\uc11c \ubc1b\uc73c\uc2e4 \uc218 \uc788\uc2b5\ub2c8\ub2e4.)<\/p>\n<p>\uadf8\ub9ac\uace0\ub294 \ub2e4\uc74c\uacfc \uac19\uc740 \uacfc\uc815\uc744 \uac70\uce58\uc2dc\uba74 \ub418\uaca0\uc2b5\ub2c8\ub2e4.<br \/>\n<span style=\"color: #0000ff;\"> 1. GeoIPCOM.dll\uc744 system32 \ud3f4\ub354\uc5d0 \ubcf5\uc0ac  &#8211; C:\\windows\\system32<br \/>\n2. \ub808\uc9c0\uc2a4\ud2b8\ub9ac\uc5d0 DLL\ub4f1\ub85d &#8211; \ub3c4\uc2a4 \ubaa8\ub4dc\uc5d0\uc11c \uc2e4\ud589 regsvr32 GeoIPCOM.dll<br \/>\n3. GeoIP.dat \ub97c \uc801\ub2f9\ud55c \uc704\uce58\ub85c \ubcf5\uc0ac(\ud639\uc740 \uc774\ub3d9)<br \/>\n4. \ud504\ub85c\uadf8\ub7a8\uc5d0 \uc801\uc6a9<\/span><\/p>\n<p><span style=\"color: #0000ff;\"> <\/span><\/p>\n<div id=\"_mcePaste\">&lt;% Response.Buffer = TRUE %&gt;<\/div>\n<div id=\"_mcePaste\">&lt;%<\/div>\n<div id=\"_mcePaste\">ip = Request.Servervariables(&#8220;REMOTE_ADDR&#8221;)<\/div>\n<div id=\"_mcePaste\">set geoip = Server.CreateObject(&#8220;GeoIPCOM.GeoIP&#8221;)<\/div>\n<div id=\"_mcePaste\">geoip.loadDataFile(&#8220;C:\\Program Files\\GeoIP\\GeoIP.dat&#8221;) &#8216;GeoIP.dat\uc758 \uc704\uce58<\/div>\n<div id=\"_mcePaste\">country_code = geoip.country_code_by_name(ip)<\/div>\n<div id=\"_mcePaste\">if country_code = &#8220;KR&#8221; then<\/div>\n<div id=\"_mcePaste\">else<\/div>\n<div id=\"_mcePaste\">\ud55c\uad6d\uc774 \uc544\ub2d0 \ub54c\uc758 \ucf54\ub4dc \uc791\uc131<\/div>\n<div id=\"_mcePaste\">end if<\/div>\n<div id=\"_mcePaste\">%&gt;<\/div>\n<p>\uc778\ud130\ub137\uc744 \ub4a4\uc838\ubcf4\ub2c8 maxmind.com \uc5d0\uc11c\ub294 CSV \ud30c\uc77c\ub85c\ub3c4 IP \ud14c\uc774\ube14\uc744 \uacf5\uc720\ud558\ub294 \ub4ef\ud558\ub124\uc694.<\/p>\n<p>\ud3b8\ud55c \ubc29\ubc95\uc73c\ub85c \uc0ac\uc6a9\ud558\uc2dc\uba74 \ub420 \uac83 \uac19\uc2b5\ub2c8\ub2e4.<br \/>\n<a href=\"http:\/\/geolite.maxmind.com\/download\/geoip\/database\/\" target=\"_blank\"><span style=\"color: #339966;\">CSV \ud30c\uc77c \ubc1b\uae30(maxmind.com\uc758 FTP)<\/span><\/a><\/p>\n<p>\uc88b\uc740 \uc2dc\uac04 \ub418\uc2ed\uc2dc\uc624.<br \/>\n\uac10\uc0ac\ud569\ub2c8\ub2e4.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>ASP \uad00\ub828 \uccab \ud3ec\uc2a4\ud305\uc774\ub124\uc694. \uc0c8\uc0bc \ud504\ub85c\uadf8\ub798\ubc0d \uc5b8\uc5b4\ub97c \uc5ec\ub7ec\uac00\uc9c0 \uc0ac\uc6a9\ud55c\ub2e4\ub294 \uc0ac\uc2e4\uc774 \uacb0\ucf54 \uc26c\uc6b4 \uac83\uc740 \uc544\ub2c8\ub77c\ub294 \uc0ac\uc2e4\uc5d0 \ub300\ud574 \uae4a\uc774 \uc788\uac8c \uae68\ub2eb\uace0 \uc788\ub294 \uc911 \uc785\ub2c8\ub2e4. \ub450\uac00\uc9c0 \uc774\uc720 \ub54c\ubb38\uc778\ub370\uc694. 1. \ud504\ub85c\uadf8\ub798\ubc0d \uad6c\uc870\uac00 \ub2e4\ub974\ub2e4\ub294 \uac83. 2. \uc2dc\uc2a4\ud15c \ud658\uacbd\uc774 \ub2e4\ub974\ub2e4\ub294 \uac83. \uc785\ub2c8\ub2e4. 2\ubc88\uc774\uc57c \uc6cc\ub099 \uc2dc\uc2a4\ud15c\uc5d0 \uc57d\ud55c \ud3b8\uc774\uae30\ub3c4 \ud558\uace0, \ud544\uc694\ud55c \uac83\ub4e4\ub9cc \ucc3e\uc544\uc11c \ud798\uacb9\uac8c \ucc98\ub9ac\ud558\uace0 \uc788\ub294 \uc911\uc774\uae30\uc5d0 \ubb58 \ud574\ub3c4 \uc27d\uc9c0 \uc54a\uc9c0\ub9cc, 1. \ud504\ub85c\uadf8\ub798\ubc0d [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":""},"categories":[1266,176],"tags":[481,477,480,485,484,488,487,479,483,482,486,476,478],"jetpack_featured_media_url":"","views":"","jetpack-related-posts":[],"_links":{"self":[{"href":"http:\/\/hyunsik.me\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/2136"}],"collection":[{"href":"http:\/\/hyunsik.me\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/hyunsik.me\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/hyunsik.me\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/hyunsik.me\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2136"}],"version-history":[{"count":4,"href":"http:\/\/hyunsik.me\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/2136\/revisions"}],"predecessor-version":[{"id":6788,"href":"http:\/\/hyunsik.me\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/2136\/revisions\/6788"}],"wp:attachment":[{"href":"http:\/\/hyunsik.me\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2136"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/hyunsik.me\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2136"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/hyunsik.me\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2136"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}