{"id":528,"date":"2011-10-25T05:56:36","date_gmt":"2011-10-25T05:56:36","guid":{"rendered":"http:\/\/sbfactory.ru\/cd\/?p=528"},"modified":"2011-10-25T06:17:31","modified_gmt":"2011-10-25T06:17:31","slug":"%d0%ba%d0%b0%d0%ba-%d0%be%d0%b1%d0%bd%d0%be%d0%b2%d0%bb%d1%8f%d1%82%d1%8c-%d1%86%d0%b5%d0%bd%d1%8b-%d0%bd%d0%b0-%d1%81%d0%b0%d0%b9%d1%82%d0%b5-%d0%b8%d0%bb%d0%b8-%d0%bb%d1%8e%d0%b1%d1%8b%d0%b5-%d0%b4","status":"publish","type":"post","link":"https:\/\/sbfactory.ru\/cd\/?p=528","title":{"rendered":"\u041a\u0430\u043a \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c \u0446\u0435\u043d\u044b \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 (\u0438\u043b\u0438 \u043b\u044e\u0431\u044b\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435) \u043f\u0443\u0442\u0435\u043c MySQL-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432"},"content":{"rendered":"<p><!--more--><br \/>\n\u0415\u0441\u043b\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0442\u0443\u0442 php-\u0441\u043a\u0440\u0438\u043f\u0442 \u043a \u0448\u0430\u0431\u043b\u043e\u043d\u0443 \u0432\u044b\u0432\u043e\u0434\u0430, \u0442\u043e Content Downloader \u043f\u0440\u0438 \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0435 \u0441\u0430\u0439\u0442\u043e\u0432 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u043e\u043c\u0443 php-\u0441\u043a\u0440\u0438\u043f\u0442\u0443. \u0410 \u0441\u043a\u0440\u0438\u043f\u0442, \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u0431\u0443\u0434\u0435\u0442 \u0434\u0435\u043b\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441 \u043a MySQL \u0431\u0430\u0437\u0435. \u0422\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u043c\u043e\u0436\u043d\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c \u0446\u0435\u043d\u044b \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442-\u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430\u0445 (\u0430 \u0442\u0430\u043a\u0436\u0435 \u043b\u044e\u0431\u0443\u044e \u0434\u0440\u0443\u0433\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043d\u0430 \u043b\u044e\u0431\u044b\u0445 \u0441\u0430\u0439\u0442\u0430\u0445).<\/p>\n<p>\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 wp_posts \u044f\u0447\u0435\u0439\u043a\u0438 \u0438\u0437 \u0441\u0442\u043e\u043b\u0431\u0446\u0430 post_content (\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u044f\u0447\u0435\u0439\u043a\u0430\u043c \u0441\u0442\u043e\u043b\u0431\u0446\u0430 post_title).<\/p>\n<p>\u0414\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f php-\u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u043a \u0448\u0430\u0431\u043b\u043e\u043d\u0443 \u0432\u044b\u0432\u043e\u0434\u0430 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 \u043a\u043d\u043e\u043f\u043a\u0443 &#8220;\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0432\u044b\u0432\u043e\u0434\u0430&#8221;( \u043d\u0430 \u043f\u0430\u043d\u0435\u043b\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b) \u0438 \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0432 \u0448\u0430\u0431\u043b\u043e\u043d \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043c\u0430\u043a\u0440\u043e\u0441:<\/p>\n<pre lang=\"html\" line=\"1\"><PHP_SCRIPT_2=http:\/\/\u043f\u043e\u043b\u043d\u044b\u0439_\u043f\u0443\u0442\u044c_\u043a_\u0441\u043a\u0440\u0438\u043f\u0442\u0443.php>\r\nfield1_text=<CD_GRAN_2!>\r\nfield2_new_text=<CD_GRAN_1!><\/PHP_SCRIPT_2><\/pre>\n<p>\u0412 \u043c\u0430\u043a\u0440\u043e\u0441\u0435 <strong>CD_GRAN_1!<\/strong> (\u0433\u0440\u0430\u043d\u0438\u0446\u0430 \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 1) \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u043d\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044f field2_name (\u0441\u0442\u043e\u043b\u0431\u0435\u0446 \u0442\u0430\u0431\u043b\u0438\u0446\u044b post_content). \u0412 \u043c\u0430\u043a\u0440\u043e\u0441\u0435 <strong>CD_GRAN_2!<\/strong> (\u0433\u0440\u0430\u043d\u0438\u0446\u0430 \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 2) \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044f field1_text (\u0441\u0442\u043e\u043b\u0431\u0435\u0446 \u0442\u0430\u0431\u043b\u0438\u0446\u044b post_title).<\/p>\n<table>\n<tr>\n<td>\n<p><img loading=\"lazy\" src=\"http:\/\/sbfactory.ru\/cd\/wp-content\/uploads\/2011\/10\/mysql_table_names.png\" alt=\"MySQL \u0442\u0430\u0431\u043b\u0438\u0446\u0430\" title=\"MySQL \u0442\u0430\u0431\u043b\u0438\u0446\u0430\" width=\"1048\" height=\"544\" class=\"alignnone size-full wp-image-529\" srcset=\"https:\/\/sbfactory.ru\/cd\/wp-content\/uploads\/2011\/10\/mysql_table_names.png 1048w, https:\/\/sbfactory.ru\/cd\/wp-content\/uploads\/2011\/10\/mysql_table_names-300x155.png 300w, https:\/\/sbfactory.ru\/cd\/wp-content\/uploads\/2011\/10\/mysql_table_names-1024x531.png 1024w\" sizes=\"(max-width: 1048px) 100vw, 1048px\" \/><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043c\u0435\u043d\u0435\u043d\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u044f\u0447\u0435\u0439\u043a\u0438 \u0432 \u0441\u0442\u043e\u043b\u0431\u0446\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b post_content (\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442) \u043d\u0430 \u0442\u0435\u043a\u0441\u0442 \u043c\u0430\u043a\u0440\u043e\u0441\u0430 <strong>CD_GRAN_1!<\/strong>. <strong>\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u044f\u0447\u0435\u0439\u043a\u0438 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0441\u044f \u0438\u043c\u0435\u043d\u043d\u043e \u0432 \u0442\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 post_title \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u0435\u043d \u0442\u0435\u043a\u0441\u0442\u0443 \u043c\u0430\u043a\u0440\u043e\u0441\u0430 CD_GRAN_2!.<\/strong><\/p>\n<p>\u041a\u043e\u0434 \u0441\u043a\u0440\u0438\u043f\u0442\u0430: <\/p>\n<pre lang=\"html\" line=\"1\"><?php\r\n$db = mysql_connect(\"localhost\", \"\u0438\u043c\u044f_\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\", \"\u043f\u0430\u0440\u043e\u043b\u044c\");\r\nmysql_select_db(\"\u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435_\u0431\u0430\u0437\u044b\");\r\nmysql_query(\"SET NAMES utf8\");\r\nmysql_query(\"UPDATE wp_posts SET post_content = '\".$_POST[field2_new_text].\"' WHERE post_title='\".$_POST[field1_text].\"'\");\r\n?><\/pre>\n<p>\u0413\u0434\u0435 <strong>wp_posts<\/strong> &#8211; <strong><font color=\"lime\">\u0438\u043c\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u044b<\/font><\/strong>, <strong>post_title<\/strong> &#8211; <strong><font color=\"lime\">\u0438\u043c\u044f \u043f\u043e\u043b\u044f 1<\/font><\/strong>, <strong>post_content<\/strong> &#8211; <strong><font color=\"lime\">\u0438\u043c\u044f \u043f\u043e\u043b\u044f 2<\/font><\/strong> (\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442).<\/p>\n<p>\u0421\u043a\u0440\u0438\u043f\u0442 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0432 UTF-8 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0435!<\/p>\n<p><b>\u0421\u043a\u0430\u0447\u0430\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442 (\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c \u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b):<\/b><br \/>\n<a href=\"http:\/\/sbfactory.ru\/cd\/files\/replace.zip\"> &#8211; php-\u0441\u043a\u0440\u0438\u043f\u0442 \u0434\u043b\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0432 \u0411\u0414 MySQL (\u0435\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043d\u0430 \u0432\u0430\u0448 \u0445\u043e\u0441\u0442\u0438\u043d\u0433)<\/a><\/p>\n<span id=\"post-ratings-528\" class=\"post-ratings\" data-nonce=\"00cfa42838\"><img id=\"rating_528_1\" src=\"https:\/\/sbfactory.ru\/cd\/wp-content\/plugins\/wp-postratings\/images\/stars\/rating_on.gif\" alt=\"1 Star\" title=\"1 Star\" onmouseover=\"current_rating(528, 1, '1 Star');\" onmouseout=\"ratings_off(5, 0, 0);\" onclick=\"rate_post();\" onkeypress=\"rate_post();\" style=\"cursor: pointer; border: 0px;\" \/><img id=\"rating_528_2\" src=\"https:\/\/sbfactory.ru\/cd\/wp-content\/plugins\/wp-postratings\/images\/stars\/rating_on.gif\" alt=\"2 Stars\" title=\"2 Stars\" onmouseover=\"current_rating(528, 2, '2 Stars');\" onmouseout=\"ratings_off(5, 0, 0);\" onclick=\"rate_post();\" onkeypress=\"rate_post();\" style=\"cursor: pointer; border: 0px;\" \/><img id=\"rating_528_3\" src=\"https:\/\/sbfactory.ru\/cd\/wp-content\/plugins\/wp-postratings\/images\/stars\/rating_on.gif\" alt=\"3 Stars\" title=\"3 Stars\" onmouseover=\"current_rating(528, 3, '3 Stars');\" onmouseout=\"ratings_off(5, 0, 0);\" onclick=\"rate_post();\" onkeypress=\"rate_post();\" style=\"cursor: pointer; border: 0px;\" \/><img id=\"rating_528_4\" src=\"https:\/\/sbfactory.ru\/cd\/wp-content\/plugins\/wp-postratings\/images\/stars\/rating_on.gif\" alt=\"4 Stars\" title=\"4 Stars\" onmouseover=\"current_rating(528, 4, '4 Stars');\" onmouseout=\"ratings_off(5, 0, 0);\" onclick=\"rate_post();\" onkeypress=\"rate_post();\" style=\"cursor: pointer; border: 0px;\" \/><img id=\"rating_528_5\" src=\"https:\/\/sbfactory.ru\/cd\/wp-content\/plugins\/wp-postratings\/images\/stars\/rating_on.gif\" alt=\"5 Stars\" title=\"5 Stars\" onmouseover=\"current_rating(528, 5, '5 Stars');\" onmouseout=\"ratings_off(5, 0, 0);\" onclick=\"rate_post();\" onkeypress=\"rate_post();\" style=\"cursor: pointer; border: 0px;\" \/> (\u043e\u0446\u0435\u043d\u043e\u043a: <strong>7<\/strong>, \u0441\u0440\u0435\u0434\u043d\u0438\u0439 \u0431\u0430\u043b\u043b: <strong>5.00<\/strong>)<\/span><span id=\"post-ratings-528-loading\" class=\"post-ratings-loading\"><img src=\"https:\/\/sbfactory.ru\/cd\/wp-content\/plugins\/wp-postratings\/images\/loading.gif\" width=\"16\" height=\"16\" class=\"post-ratings-image\" \/>Loading...<\/span>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/sbfactory.ru\/cd\/index.php?rest_route=\/wp\/v2\/posts\/528"}],"collection":[{"href":"https:\/\/sbfactory.ru\/cd\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sbfactory.ru\/cd\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sbfactory.ru\/cd\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sbfactory.ru\/cd\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=528"}],"version-history":[{"count":19,"href":"https:\/\/sbfactory.ru\/cd\/index.php?rest_route=\/wp\/v2\/posts\/528\/revisions"}],"predecessor-version":[{"id":548,"href":"https:\/\/sbfactory.ru\/cd\/index.php?rest_route=\/wp\/v2\/posts\/528\/revisions\/548"}],"wp:attachment":[{"href":"https:\/\/sbfactory.ru\/cd\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=528"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sbfactory.ru\/cd\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=528"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sbfactory.ru\/cd\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=528"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}