{"id":1293,"date":"2013-02-23T20:46:07","date_gmt":"2013-02-23T18:46:07","guid":{"rendered":"http:\/\/www.andboson.com\/?p=1293"},"modified":"2013-02-23T20:50:01","modified_gmt":"2013-02-23T18:50:01","slug":"%d0%b0%d0%b2%d1%82%d0%be%d1%80%d0%b8%d0%b7%d0%b0%d1%86%d0%b8%d1%8f-%d0%b1%d0%b5%d0%b7-curl","status":"publish","type":"post","link":"https:\/\/www.andboson.com\/?p=1293","title":{"rendered":"\u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u0431\u0435\u0437 curl"},"content":{"rendered":"<p>\u0415\u0441\u0442\u044c \u0442\u0438\u043f \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043a\u0443\u0434\u0430 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c curl \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u0442\u0438\u0447\u043d\u043e.<br \/>\n\u041d\u043e \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0438\u043c\u0435\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0441\u0430\u0439\u0442\u0430\u043c \u0441 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0435\u0439.<\/p>\n<p>\u041f\u043e\u0441\u0435\u043c\u0443, \u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430, \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432 \u044d\u0442\u0438\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445:<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\n\r\n\/\/ \u043b\u043e\u0433\u0438\u043d \u0438 \u043f\u0430\u0440\u043e\u043b\u044c\r\n $postdata = http_build_query(\r\n array(\r\n 'login' =&gt; $ini['login'],\r\n 'passwd' =&gt; $ini['password']\r\n )\r\n );\r\n\r\n\/\/ \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a\r\n$opts = array(\r\n 'http'=&gt;array(\r\n 'method'=&gt;&quot;POST&quot;,\r\n 'header'=&gt;&quot;Content-type: application\/x-www-form-urlencoded\\r\\n User-Agent : Opera\/9.80 (X11; Linux i686; U; ru) Presto\/2.7.62 Version\/11.00 \\r\\n&quot;.\r\n &quot;Accept-Language: ru-RU,ru;q=0.9,en;q=0.8 \\r\\n&quot;.\r\n &quot;Accept-Charset:utf-8, utf-16, *;q=0.1 \\r\\n&quot;.\r\n &quot;Accept-Encoding:identity, *;q=0&quot;,\r\n 'content' =&gt; $postdata\r\n )\r\n );\r\n\r\n\/\/ \u0441\u0430\u043c \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e\r\n$context = stream_context_create($opts);\r\n $result = file_get_contents('http:\/\/\u043d\u0443\u0436\u043d\u044b\u0439 \u0441\u0430\u0439\u0442\/login.aspx', false, $context);\r\n $coo = Array();\r\n foreach( $http_response_header as $head){\r\n if(stristr($head, 'Set-Cookie:' )) $coo[] = (str_ireplace('Set-Cookie:', '', $head ));\r\n }\r\n $coo = implode('; ',$coo);\r\n\r\n<\/pre>\n<p>\u0422\u0443\u0442 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u043e\u0442 \u0441\u0430\u0439\u0442\u0430 \u043a\u0443\u043a\u0438 \u0438 \u0441\u043e\u0431\u0440\u0430\u043b\u0438 \u0438\u0445 \u0434\u043b\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f<\/p>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u043a\u0443\u043a\u0438, \u0434\u0430\u043b\u0435\u0435 \u0443\u0436\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u044b \u0434\u0430\u043d\u043d\u044b\u0435:<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\n$opts = array(\r\n 'http'=&gt;array(\r\n 'method'=&gt;&quot;POST&quot;,\r\n 'header'=&gt;&quot;Content-type: application\/x-www-form-urlencoded\\r\\n User-Agent : Opera\/9.80 (X11; Linux i686; U; ru) Presto\/2.7.62 Version\/11.00 \\r\\n&quot;.\r\n &quot;Accept-Language: ru-RU,ru;q=0.9,en;q=0.8 \\r\\n&quot;.\r\n &quot;Accept-Charset:utf-8, utf-16, *;q=0.1 \\r\\n&quot;.\r\n &quot;Accept-Encoding:identity, *;q=0 \\r\\n&quot;.\r\n &quot;Cookie: &quot;.$coo,\r\n 'content' =&gt; $postdata\r\n )\r\n );\r\n\r\n$context = stream_context_create($opts);\r\n $result = file_get_contents('http:\/\/\u043d\u0443\u0436\u043d\u044b\u0439 \u0441\u0430\u0439\u0442\/profile.aspx?page='.$f_page, false, $context);\r\n&lt;pre&gt;<\/pre>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\n\u041d\u0443 \u0438 \u043e\u0431\u043d\u043e\u0432\u0438\u043b\u0441\u044f<a href=\"http:\/\/www.andboson.com\/?p=1138\"> \u043f\u043b\u0430\u0433\u0438\u043d \u0434\u043b\u044f \u043c\u0435\u0434\u0438\u0430\u0442\u0430\u043d\u043a\u043e\u0432<\/a> \u0434\u043b\u044f FS.UA: http:\/\/code.google.com\/p\/fsua\/<\/p>\n<ul>\n<li>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u0438\u0437\u0431\u0440\u0430\u043d\u043d\u044b\u043c<\/li>\n<li>\u041f\u0435\u0440\u0435\u0434\u0435\u043b\u0430\u043d \u043f\u043e\u0438\u0441\u043a<\/li>\n<li>\u041f\u0435\u0440\u0435\u0434\u0435\u043b\u0430\u043d \u043f\u0430\u0440\u0441\u0438\u043d\u0433<\/li>\n<li>\u041f\u043e\u0441\u0442\u0435\u0440 \u00a0\u0432 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0435<\/li>\n<li>\u043c\u0435\u043b\u043a\u0438\u0435 \u043f\u0440\u0430\u0432\u043a\u0438<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u0415\u0441\u0442\u044c \u0442\u0438\u043f \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043a\u0443\u0434\u0430 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c curl \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u0442\u0438\u0447\u043d\u043e. \u041d\u043e \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0438\u043c\u0435\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0441\u0430\u0439\u0442\u0430\u043c \u0441 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0435\u0439. \u041f\u043e\u0441\u0435\u043c\u0443, \u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430, \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432 \u044d\u0442\u0438\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445: \u0422\u0443\u0442 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u043e\u0442 \u0441\u0430\u0439\u0442\u0430 \u043a\u0443\u043a\u0438 \u0438 \u0441\u043e\u0431\u0440\u0430\u043b\u0438 \u0438\u0445 \u0434\u043b\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u043a\u0443\u043a\u0438, \u0434\u0430\u043b\u0435\u0435 \u0443\u0436\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u044b \u0434\u0430\u043d\u043d\u044b\u0435: &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; \u041d\u0443 \u0438 \u043e\u0431\u043d\u043e\u0432\u0438\u043b\u0441\u044f \u043f\u043b\u0430\u0433\u0438\u043d \u0434\u043b\u044f \u043c\u0435\u0434\u0438\u0430\u0442\u0430\u043d\u043a\u043e\u0432 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[669,666,667,668,671,670],"_links":{"self":[{"href":"https:\/\/www.andboson.com\/index.php?rest_route=\/wp\/v2\/posts\/1293"}],"collection":[{"href":"https:\/\/www.andboson.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.andboson.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.andboson.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.andboson.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1293"}],"version-history":[{"count":4,"href":"https:\/\/www.andboson.com\/index.php?rest_route=\/wp\/v2\/posts\/1293\/revisions"}],"predecessor-version":[{"id":1297,"href":"https:\/\/www.andboson.com\/index.php?rest_route=\/wp\/v2\/posts\/1293\/revisions\/1297"}],"wp:attachment":[{"href":"https:\/\/www.andboson.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1293"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.andboson.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1293"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.andboson.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1293"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}