{"id":49735,"date":"2018-09-18T08:05:15","date_gmt":"2018-09-18T02:05:15","guid":{"rendered":"http:\/\/rcl-radio.ru\/?p=49735"},"modified":"2018-09-18T08:17:14","modified_gmt":"2018-09-18T02:17:14","slug":"%d1%81%d0%be%d0%b7%d0%b4%d0%b0%d0%b5%d0%bc-%d1%84%d0%b0%d0%b9%d0%bb-sitemap-xml","status":"publish","type":"post","link":"http:\/\/rcl-radio.ru\/?p=49735","title":{"rendered":"\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0444\u0430\u0439\u043b sitemap.xml"},"content":{"rendered":"<ul>\n<li>\u043a\u0430\u043a\u0438\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0432\u0430\u0448\u0435\u0433\u043e \u0441\u0430\u0439\u0442\u0430 \u043d\u0443\u0436\u043d\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c;<\/li>\n<li>\u043a\u0430\u043a \u0447\u0430\u0441\u0442\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u0445;<\/li>\n<li>\u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u0430\u043a\u0438\u0445 \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0432\u0430\u0436\u043d\u043e.<\/li>\n<\/ul>\n<p>\u0424\u0430\u0439\u043b Sitemap \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0441\u0430\u0439\u0442\u0430 \u0440\u043e\u0431\u043e\u0442\u043e\u043c, \u043e\u0434\u043d\u0430\u043a\u043e \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043d\u0435 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u044e\u0442, \u0447\u0442\u043e \u0432\u0441\u0435 URL, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u0432 \u0444\u0430\u0439\u043b\u0435, \u0431\u0443\u0434\u0443\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b \u0432 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441.<\/p>\n<pre class=\"plsql\" style=\"font-family: monospace; font-size: 12px;\"><a href=\"http:\/\/www.oracle.com\/pls\/db92\/db92.drilldown?word=IF\"><span style=\"color: #00f;\">IF<\/span><\/a> <span style=\"color: #00f;\">(<\/span>isset<span style=\"color: #00f;\">(<\/span>$_POST<span style=\"color: #00f;\">[<\/span><span style=\"color: #f00;\">'submit'<\/span><span style=\"color: #00f;\">]<\/span><span style=\"color: #00f;\">)<\/span><span style=\"color: #00f;\">)<\/span>\r\n<span style=\"color: #00f;\">{<\/span>\r\n    $sitemap <span style=\"color: #00f;\">=<\/span> <span style=\"color: #f00;\">'..\/sitemap.xml'<\/span><span style=\"color: #00f;\">;<\/span>\r\n    $action <span style=\"color: #00f;\">=<\/span> fopen<span style=\"color: #00f;\">(<\/span>$sitemap<span style=\"color: #00f;\">,<\/span> <span style=\"color: #f00;\">'w'<\/span><span style=\"color: #00f;\">)<\/span><span style=\"color: #00f;\">;<\/span> # \u0415\u0441\u043b\u0438 \u0444\u0430\u0439\u043b\u0430 \u043d\u0435\u0442<span style=\"color: #00f;\">,<\/span> \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u0435\u0433\u043e<span style=\"color: #00f;\">.<\/span> \u0415\u0441\u043b\u0438 \u0444\u0430\u0439\u043b \u0435\u0441\u0442\u044c<span style=\"color: #00f;\">,<\/span> \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u043c \u0435\u0433\u043e \u043d\u0430 \u043d\u043e\u0432\u044b\u0439<span style=\"color: #00f;\">,<\/span> \u043f\u0443\u0441\u0442\u043e\u0439\r\n    <a href=\"http:\/\/www.oracle.com\/pls\/db92\/db92.drilldown?word=IF\"><span style=\"color: #00f;\">IF<\/span><\/a> <span style=\"color: #00f;\">(<\/span>!$action<span style=\"color: #00f;\">)<\/span>\r\n    <span style=\"color: #00f;\">{<\/span>\r\n        <a href=\"http:\/\/www.oracle.com\/pls\/db92\/db92.drilldown?word=EXIT\"><span style=\"color: #00f;\">EXIT<\/span><\/a><span style=\"color: #00f;\">(<\/span><span style=\"color: #f00;\">'\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u0430\u0440\u0442\u0443 \u0441\u0430\u0439\u0442\u0430.'<\/span><span style=\"color: #00f;\">)<\/span><span style=\"color: #00f;\">;<\/span>\r\n    <span style=\"color: #00f;\">}<\/span>\r\n\u00a0\r\n    $file <span style=\"color: #00f;\">=<\/span> fopen<span style=\"color: #00f;\">(<\/span>$sitemap<span style=\"color: #00f;\">,<\/span> <span style=\"color: #f00;\">'a'<\/span><span style=\"color: #00f;\">)<\/span><span style=\"color: #00f;\">;<\/span> # \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0444\u0430\u0439\u043b \u0434\u043b\u044f \u0437\u0430\u043f\u0438\u0441\u0438\r\n    $xml <span style=\"color: #00f;\">=<\/span> <span style=\"color: #f00;\">\"&lt;?xml version=\"<\/span><span style=\"color: #800;\">1.0<\/span><span style=\"color: #f00;\">\" encoding=\"<\/span>UTF<span style=\"color: #00f;\">-<\/span><span style=\"color: #800;\">8<\/span><span style=\"color: #f00;\">\" ?&gt;\r\n\"<\/span><span style=\"color: #00f;\">;<\/span>\r\n    $xml <span style=\"color: #00f;\">.=<\/span> <span style=\"color: #f00;\">\"&lt;urlset xmlns=\"<\/span>http<span style=\"color: #00f;\">:\/\/<\/span>www<span style=\"color: #00f;\">.<\/span>sitemaps<span style=\"color: #00f;\">.<\/span>org<span style=\"color: #00f;\">\/<\/span>schemas<span style=\"color: #00f;\">\/<\/span>sitemap<span style=\"color: #00f;\">\/<\/span><span style=\"color: #800;\">0.9<\/span><span style=\"color: #f00;\">\"&gt;\r\n\"<\/span><span style=\"color: #00f;\">;<\/span>\r\n  #  foreach <span style=\"color: #00f;\">(<\/span>$id <a href=\"http:\/\/www.oracle.com\/pls\/db92\/db92.drilldown?word=AS\"><span style=\"color: #00f;\">AS<\/span><\/a> $value<span style=\"color: #00f;\">)<\/span> # \u0417\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0432\u0441\u0435 \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0441\u0442\u0430\u0442\u044c\u0438 \u0432 \u0444\u0430\u0439\u043b\r\n    <span style=\"color: #00f;\">{<\/span>\r\n\u00a0\r\n$query <span style=\"color: #00f;\">=<\/span> <span style=\"color: #f00;\">\"SELECT * FROM blog\"<\/span><span style=\"color: #00f;\">;<\/span> <span style=\"color: #00f;\">\/\/<\/span> \u0434\u0435\u043b\u0430\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441 \u043a \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 <span style=\"color: #00f;\">(<\/span>blog <span style=\"color: #00f;\">-<\/span> \u0438\u043c\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u044b<span style=\"color: #00f;\">)<\/span>\r\n    $result <span style=\"color: #00f;\">=<\/span> mysql_query<span style=\"color: #00f;\">(<\/span>$query<span style=\"color: #00f;\">)<\/span><span style=\"color: #00f;\">;<\/span>\r\n<a href=\"http:\/\/www.oracle.com\/pls\/db92\/db92.drilldown?word=WHILE\"><span style=\"color: #00f;\">WHILE<\/span><\/a><span style=\"color: #00f;\">(<\/span>$r <span style=\"color: #00f;\">=<\/span> mysql_fetch_array<span style=\"color: #00f;\">(<\/span>$result<span style=\"color: #00f;\">)<\/span><span style=\"color: #00f;\">)<\/span><span style=\"color: #00f;\">{<\/span>\r\n   $id<span style=\"color: #00f;\">=<\/span>$r<span style=\"color: #00f;\">[<\/span><span style=\"color: #f00;\">'blog_id'<\/span><span style=\"color: #00f;\">]<\/span> <span style=\"color: #00f;\">;<\/span> <span style=\"color: #00f;\">\/\/<\/span> blog_id <span style=\"color: #00f;\">-<\/span> id \u043d\u043e\u043c\u0435\u0440 \u0441\u0442\u0430\u0442\u044c\u0438\r\n $r_date <span style=\"color: #00f;\">=<\/span> $r<span style=\"color: #00f;\">[<\/span><span style=\"color: #f00;\">'date'<\/span><span style=\"color: #00f;\">]<\/span><span style=\"color: #00f;\">;<\/span> <span style=\"color: #00f;\">\/\/<\/span> \u0444\u043e\u043c\u0430\u0442 \u0434\u0430\u0442\u044b \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c<span style=\"color: #00f;\">:<\/span> <span style=\"color: #800;\">2017<\/span><span style=\"color: #00f;\">-<\/span>08<span style=\"color: #00f;\">-<\/span><span style=\"color: #800;\">29<\/span> \r\n $n<span style=\"color: #00f;\">++;<\/span>\r\n        $xml <span style=\"color: #00f;\">.=<\/span> <span style=\"color: #f00;\">\"    &lt;url&gt;\r\n\"<\/span><span style=\"color: #00f;\">;<\/span>\r\n        $xml <span style=\"color: #00f;\">.=<\/span> <span style=\"color: #f00;\">\"        &lt;loc&gt;http:\/\/\"<\/span><span style=\"color: #00f;\">.<\/span>$_SERVER<span style=\"color: #00f;\">[<\/span><span style=\"color: #f00;\">'SERVER_NAME'<\/span><span style=\"color: #00f;\">]<\/span><span style=\"color: #00f;\">.<\/span><span style=\"color: #f00;\">\"\/?blog_id=\"<\/span><span style=\"color: #00f;\">.<\/span> $id <span style=\"color: #00f;\">.<\/span> <span style=\"color: #f00;\">\"&lt;\/loc&gt;\r\n\"<\/span><span style=\"color: #00f;\">;<\/span>\r\n        $xml <span style=\"color: #00f;\">.=<\/span> <span style=\"color: #f00;\">\"        &lt;lastmod&gt;\"<\/span> <span style=\"color: #00f;\">.<\/span>$r_date<span style=\"color: #00f;\">.<\/span> <span style=\"color: #f00;\">\"&lt;\/lastmod&gt;\r\n\"<\/span><span style=\"color: #00f;\">;<\/span>\r\n        $xml <span style=\"color: #00f;\">.=<\/span> <span style=\"color: #f00;\">\"        &lt;changefreq&gt;daily&lt;\/changefreq&gt;\r\n\"<\/span><span style=\"color: #00f;\">;<\/span>\r\n        $xml <span style=\"color: #00f;\">.=<\/span> <span style=\"color: #f00;\">\"        &lt;priority&gt;0.5&lt;\/priority&gt;\r\n\"<\/span><span style=\"color: #00f;\">;<\/span>\r\n        $xml <span style=\"color: #00f;\">.=<\/span> <span style=\"color: #f00;\">\"    &lt;\/url&gt;\r\n\"<\/span><span style=\"color: #00f;\">;<\/span> # \u0421\u043e\u0437\u0434\u0430\u0451\u043c \u043a\u043e\u0434 \u0434\u043b\u044f \u0432\u0441\u0442\u0430\u0432\u043a\u0438 \u0432 \u0444\u0430\u0439\u043b    \r\n\u00a0\r\n    <span style=\"color: #00f;\">}<\/span><span style=\"color: #00f;\">}<\/span>\r\n    $xml <span style=\"color: #00f;\">.=<\/span> <span style=\"color: #f00;\">'&lt;\/urlset&gt;'<\/span><span style=\"color: #00f;\">;<\/span>\r\n\u00a0\r\n$write <span style=\"color: #00f;\">=<\/span> fwrite<span style=\"color: #00f;\">(<\/span>$file<span style=\"color: #00f;\">,<\/span> $xml<span style=\"color: #00f;\">)<\/span><span style=\"color: #00f;\">;<\/span> # \u0417\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u043a\u043e\u0434 \u0432 \u0444\u0430\u0439\u043b\r\n    fclose<span style=\"color: #00f;\">(<\/span>$file<span style=\"color: #00f;\">)<\/span><span style=\"color: #00f;\">;<\/span> # \u0417\u0430\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0444\u0430\u0439\u043b\r\n    <a href=\"http:\/\/www.oracle.com\/pls\/db92\/db92.drilldown?word=IF\"><span style=\"color: #00f;\">IF<\/span><\/a> <span style=\"color: #00f;\">(<\/span>!$write<span style=\"color: #00f;\">)<\/span>\r\n    <span style=\"color: #00f;\">{<\/span>\r\n        echo <span style=\"color: #f00;\">'\u041e\u0448\u0438\u0431\u043a\u0430 \u0437\u0430\u043f\u0438\u0441\u0438 \u0444\u0430\u0439\u043b\u0430.'<\/span><span style=\"color: #00f;\">;<\/span> \r\n    <span style=\"color: #00f;\">}<\/span>\r\n    <a href=\"http:\/\/www.oracle.com\/pls\/db92\/db92.drilldown?word=ELSE\"><span style=\"color: #00f;\">ELSE<\/span><\/a>\r\n    <span style=\"color: #00f;\">{<\/span>\r\n        echo <span style=\"color: #f00;\">'&lt;li&gt;\u0424\u0430\u0439\u043b \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u043d &lt;hr&gt;&lt;a href=\"http:\/\/'<\/span><span style=\"color: #00f;\">.<\/span>$_SERVER<span style=\"color: #00f;\">[<\/span><span style=\"color: #f00;\">\"SERVER_NAME\"<\/span><span style=\"color: #00f;\">]<\/span><span style=\"color: #00f;\">.<\/span><span style=\"color: #f00;\">'\/sitemap.xml\"&gt;\r\nhttp:\/\/'<\/span><span style=\"color: #00f;\">.<\/span>$_SERVER<span style=\"color: #00f;\">[<\/span><span style=\"color: #f00;\">\"SERVER_NAME\"<\/span><span style=\"color: #00f;\">]<\/span><span style=\"color: #00f;\">.<\/span><span style=\"color: #f00;\">'\/sitemap.xml&lt;\/a&gt;&lt;br&gt;\u041f\u0435\u0440\u0435\u0434\u0430\u043d\u043e URL: '<\/span><span style=\"color: #00f;\">.<\/span>$n<span style=\"color: #00f;\">;<\/span>\r\n    <span style=\"color: #00f;\">}<\/span>\r\n\u00a0\r\n    # \u0423\u0434\u0430\u043b\u044f\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438\r\n    unset<span style=\"color: #00f;\">(<\/span>$sitemap<span style=\"color: #00f;\">,<\/span> $action<span style=\"color: #00f;\">,<\/span> $file<span style=\"color: #00f;\">,<\/span> $xml<span style=\"color: #00f;\">,<\/span> $write<span style=\"color: #00f;\">)<\/span><span style=\"color: #00f;\">;<\/span>    \r\n<span style=\"color: #00f;\">}<\/span><\/pre>\n<pre class=\"cpp\" style=\"font-family: monospace; font-size: 12px;\"><a href=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/09\/73548783729807340892.png\" class=\"highslide-image\" onclick=\"return hs.expand(this);\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-49736\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/09\/73548783729807340892.png\" alt=\"\" width=\"559\" height=\"528\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/09\/73548783729807340892.png 559w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/09\/73548783729807340892-200x189.png 200w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/09\/73548783729807340892-500x472.png 500w\" sizes=\"auto, (max-width: 559px) 100vw, 559px\" \/><\/a><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u043a\u0430\u043a\u0438\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0432\u0430\u0448\u0435\u0433\u043e \u0441\u0430\u0439\u0442\u0430 \u043d\u0443\u0436\u043d\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c; \u043a\u0430\u043a \u0447\u0430\u0441\u0442\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u0445; \u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u0430\u043a\u0438\u0445 \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0432\u0430\u0436\u043d\u043e. \u0424\u0430\u0439\u043b Sitemap \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0441\u0430\u0439\u0442\u0430 \u0440\u043e\u0431\u043e\u0442\u043e\u043c, \u043e\u0434\u043d\u0430\u043a\u043e \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043d\u0435 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u044e\u0442, \u0447\u0442\u043e \u0432\u0441\u0435 URL, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u0432 \u0444\u0430\u0439\u043b\u0435, \u0431\u0443\u0434\u0443\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b \u0432 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441. IF (isset($_POST[&#8216;submit&#8217;])) { $sitemap = &#8216;..\/sitemap.xml&#8217;; $action = fopen($sitemap, &#8216;w&#8217;); # \u0415\u0441\u043b\u0438 \u0444\u0430\u0439\u043b\u0430 \u043d\u0435\u0442, \u0441\u043e\u0437\u0434\u0430\u0451\u043c [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":49675,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[183],"tags":[],"class_list":["post-49735","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-php"],"views":2763,"_links":{"self":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/49735","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=49735"}],"version-history":[{"count":2,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/49735\/revisions"}],"predecessor-version":[{"id":49742,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/49735\/revisions\/49742"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/media\/49675"}],"wp:attachment":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=49735"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=49735"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=49735"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}