{"id":1110,"date":"2004-03-18T02:23:24","date_gmt":"2004-03-18T02:23:24","guid":{"rendered":"http:\/\/dev.jblove.net\/?p=1110"},"modified":"2004-03-18T02:23:24","modified_gmt":"2004-03-18T02:23:24","slug":"%ec%86%8c%ec%bc%93%ec%9d%b4%ec%9a%a9-post-get-%eb%b0%a9%ec%8b%9d%ec%9c%bc%eb%a1%9c-%eb%82%b4%ec%9a%a9-%eb%b0%9b%ec%95%84%ec%98%a4%eb%8a%94-%ed%81%b4%eb%9e%98%ec%8a%a4","status":"publish","type":"post","link":"https:\/\/jblove.net\/?p=1110","title":{"rendered":"\uc18c\ucf13\uc774\uc6a9 post, get \ubc29\uc2dd\uc73c\ub85c \ub0b4\uc6a9 \ubc1b\uc544\uc624\ub294 \ud074\ub798\uc2a4"},"content":{"rendered":"<p>GET, POST\ub97c \uc774\uc6a9\ud574 \ub0b4\uc6a9\uc744 \ubc1b\uc544\uc624\ub294 \ud074\ub798\uc2a4 \uc870\ud68c\uc218:2806 <\/p>\n<p>\uac80\uc0c9\ud574\ubcf4\ub2c8 \ub098\uc624\uae34 \ud558\ub294\ub370 \uc81c\uac00 \ud544\uc694\ud55c \uae30\ub2a5\uc744 \uac16\ucd94\uc9c0 \ubabb\ud588\ub354\uad70\uc694.<br \/>\n\uadf8\ub798\uc11c \uc81c\uac00 \ud544\uc694\ud55c \ub300\ub85c \uae09\uc870\ud574\ubd24\uc2b5\ub2c8\ub2e4.<br \/>\n\ud639\uc5ec\ub098 \ud544\uc694\ud558\uc2e0 \ubd84 \uc788\uc744\uae4c \ud574\uc11c \uc62c\ub824\ubd05\ub2c8\ub2e4. \ucc38\uc870\ud558\uc2dc\uae30 \ubc14\ub78d\ub2c8\ub2e4.<\/p>\n<p>\n\uc0ac\uc6a9 \uc608:<br \/>\n<?php\n\n\nrequire_once &#8220;class.network.get_Page.php&#8221;;\n\n\n$http = new http_get_Page;\n\n\n$http->server = &#8220;phpschool.com&#8221;;<br \/>\n$http->port = 80;<br \/>\n$http->method = &#8220;get&#8221;; \/\/ POST\ub97c \uc0ac\uc6a9\ud558\uc2dc\ub824\uba74 post\ub85c \ubcc0\uacbd\ud574 \uc8fc\uc138\uc694.<br \/>\n$http->path = &#8220;\/bbs2\/inc_board.html&#8221;;<\/p>\n<p>$http->header[&#8220;Accept&#8221;] = &#8220;image\/gif, image\/x-xbitmap, image\/jpeg, image\/pjpeg, application\/x-shockwave-flash, application\/vnd.ms-excel, application\/vnd.ms-powerpoint, application\/msword, *\/*&#8221;;<br \/>\n$http->header[&#8220;Referer&#8221;] = &#8220;http:\/\/phpschool.com\/&#8221;;<br \/>\n$http->header[&#8220;Accept-Language&#8221;] = &#8220;ko&#8221;;<br \/>\n$http->header[&#8220;Content-Type&#8221;] = &#8220;application\/x-www-form-urlencoded&#8221;;<br \/>\n$http->header[&#8220;User-Agent&#8221;] = &#8220;Mozilla\/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705)&#8221;;<br \/>\n$http->header[&#8220;Host&#8221;] = $http->server;<br \/>\n$http->header[&#8220;Connection&#8221;] = &#8220;Keep-Alive&#8221;;<br \/>\n$http->header[&#8220;Cache-Control&#8221;] = &#8220;no-cache&#8221;;<\/p>\n<p>$http->variable[&#8220;code&#8221;] = &#8220;tnt2&#8221;;<\/p>\n<p>$http->openSock();<br \/>\n$data_get = $http->getPage();<\/p>\n<p>echo nl2br(htmlspecialchars($data));<\/p>\n<p>?><\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\nclass.network.get_Page.php<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p><?php\n\n\nclass http_get_Page {<br \/>\n        var $server;<br \/>\n        var $port;<br \/>\n        var $method;<br \/>\n        var $sock;<br \/>\n        var $path;<br \/>\n        var $header = array();<br \/>\n        var $variable = array();<br \/>\n        var $cmd;<br \/>\n        var $config;<\/p>\n<p>        function http_get_Page() {<br \/>\n                $this->port = 80;<br \/>\n                $this->method = &#8220;get&#8221;;<br \/>\n                $this->path = &#8220;\/&#8221;;<\/p>\n<p>                $this->config = array(<br \/>\n                        &#8220;version&#8221; => &#8220;1.0&#8221;,<br \/>\n                        &#8220;name&#8221; => &#8220;Get files through http protocol&#8221;,<br \/>\n                        &#8220;debugname&#8221; => &#8220;class.network.get_Page.php&#8221;,<br \/>\n                );<br \/>\n        }<\/p>\n<p>        function openSock() {<br \/>\n                $this->sock = @fsockopen($this->server, $this->port);<br \/>\n                if (!$this->sock) $this->Error(&#8220;Cannot open socket [$this->server:$this->port]&#8221;);<br \/>\n        }<\/p>\n<p>        function getPage() {<br \/>\n                if (eregi(&#8220;GET&#8221;, $this->method)) {<br \/>\n                        if ($this->variable) {<br \/>\n                                $aid_url = &#8220;?&#8221;;<br \/>\n                                foreach ($this->variable as $key => $value) {<br \/>\n                                        $key = urlencode($key);<br \/>\n                                        $value = urlencode($value);<br \/>\n                                        if ($aid_url == &#8220;?&#8221;) $aid_url .= $key.&#8221;=&#8221;.$value;<br \/>\n                                        else $aid_url .= &#8220;&#038;&#8221;.$key.&#8221;=&#8221;.$value;<br \/>\n                                }<br \/>\n                        }<\/p>\n<p>                        $cmd = &#8220;GET &#8220;.$this->path.$aid_url.&#8221; HTTP\/1.1&#8243;;<br \/>\n                        if (!$this->header) $this->Error(&#8220;No Any HTTP Headers.&#8221;);<\/p>\n<p>                        foreach ($this->header as $key => $value) {<br \/>\n                                $cmd .= &#8220;<br \/>\n&#8220;.$key.&#8221;: &#8220;.$value;<br \/>\n                        }<\/p>\n<p>                        $cmd .= &#8220;<\/p>\n<p>&#8220;;<br \/>\n                }<\/p>\n<p>                if (eregi(&#8220;POST&#8221;, $this->method)) {<br \/>\n                        if ($this->variable) {<br \/>\n                                $aid_query = &#8220;&#8221;;<\/p>\n<p>                                foreach ($this->variable as $key => $value) {<br \/>\n                                        $key = urlencode($key);<br \/>\n                                        $value = urlencode($value);<br \/>\n                                        if (!$aid_query) $aid_query .= $key.&#8221;=&#8221;.$value;<br \/>\n                                        else $aid_query .= &#8220;&#038;&#8221;.$key.&#8221;=&#8221;.$value;<br \/>\n                                }<br \/>\n                        }<\/p>\n<p>                        $cmd = &#8220;POST &#8220;.$this->path.&#8221; HTTP\/1.1&#8243;;<br \/>\n                        if (!$this->header) $this->Error(&#8220;No Any HTTP Headers.&#8221;);<\/p>\n<p>                        $strlen = strlen($aid_query);<br \/>\n                        $this->header[&#8220;Content-Length&#8221;] = $strlen;<\/p>\n<p>                        foreach ($this->header as $key => $value) {<br \/>\n                                $cmd .= &#8220;<br \/>\n&#8220;.$key.&#8221;: &#8220;.$value;<br \/>\n                        }<\/p>\n<p>                        $cmd .= &#8220;<\/p>\n<p>&#8220;;<br \/>\n                        $cmd .= $aid_query;<br \/>\n                }<\/p>\n<p>                fputs($this->sock, $cmd);<br \/>\n                $str_get = &#8220;&#8221;;<\/p>\n<p>                while (!feof($this->sock)) {<br \/>\n                        $str_get .= fgets($this->sock, 1024);<br \/>\n                }<\/p>\n<p>                return $str_get;<br \/>\n        }<\/p>\n<p>        function Error($message) {<br \/>\n                die ($this->config[debugname].&#8221; Error: &#8220;.$message);<br \/>\n        }<br \/>\n}<\/p>\n<p>?> <\/p>\n","protected":false},"excerpt":{"rendered":"<p>GET, POST\ub97c \uc774\uc6a9\ud574 \ub0b4\uc6a9\uc744 \ubc1b\uc544\uc624\ub294 \ud074\ub798\uc2a4 \uc870\ud68c\uc218:2806 \uac80\uc0c9\ud574\ubcf4\ub2c8 \ub098\uc624\uae34 \ud558\ub294\ub370 \uc81c\uac00 \ud544\uc694\ud55c \uae30\ub2a5\uc744 \uac16\ucd94\uc9c0 \ubabb\ud588\ub354\uad70\uc694. \uadf8\ub798\uc11c \uc81c\uac00 \ud544\uc694\ud55c \ub300\ub85c \uae09\uc870\ud574\ubd24\uc2b5\ub2c8\ub2e4. \ud639\uc5ec\ub098 \ud544\uc694\ud558\uc2e0 \ubd84 \uc788\uc744\uae4c \ud574\uc11c \uc62c\ub824\ubd05\ub2c8\ub2e4. \ucc38\uc870\ud558\uc2dc\uae30 \ubc14\ub78d\ub2c8\ub2e4. \uc0ac\uc6a9 \uc608: &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; class.network.get_Page.php &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[51],"tags":[],"class_list":["post-1110","post","type-post","status-publish","format-standard","hentry","category-papa-php"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/jblove.net\/index.php?rest_route=\/wp\/v2\/posts\/1110","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jblove.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jblove.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jblove.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jblove.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1110"}],"version-history":[{"count":0,"href":"https:\/\/jblove.net\/index.php?rest_route=\/wp\/v2\/posts\/1110\/revisions"}],"wp:attachment":[{"href":"https:\/\/jblove.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1110"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jblove.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1110"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jblove.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1110"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}