{"id":233957,"date":"2014-08-20T23:56:02","date_gmt":"2014-08-20T19:56:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=233957"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=233957","title":{"rendered":"<span class=\"post_title\">\u041c\u043e\u0434\u0443\u043b\u044c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0439 Wargaming.net Public API<\/span>"},"content":{"rendered":"<div class=\"content html_format\"> \t\t\t\u0421 \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u0432\u044b\u0445\u043e\u0434\u0430 WG P API \u0432 \u0431\u0435\u0442\u0430 \u0442\u0435\u0441\u0442, \u0441\u0430\u043c\u044b\u043c \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u043c \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u043c \u0441\u0442\u0430\u043b \u00ab\u043a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e \u043d\u0430 \u0441\u0430\u0439\u0442\u0435\u00bb.<br \/>  \u0422\u0430\u043a \u0443\u0436 \u0441\u043b\u043e\u0436\u0438\u043b\u043e\u0441\u044c \u2014 \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e \u043b\u0435\u043d\u0438\u0432\u043e\u0435.<br \/>  \u0414\u0430\u0431\u044b \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u0436\u0438\u0437\u043d\u044c \u0434\u0440\u0443\u0433\u0438\u043c \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0430\u043c Wargaming Developer Partner Program, \u0445\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441\u0432\u043e\u0438 \u043e\u043f\u044b\u0442\u043e\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u044f \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u0430.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u0412\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u0434\u0432\u0430.<br \/>  1. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c OpenID<br \/>  <a href=\"https:\/\/ru.wargaming.net\/support\/Knowledgebase\/Article\/View\/710\/25\/autentifikcija-openid\">\u041b\u043e\u0433\u0438\u043a\u0443 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438<\/a> wargaming \u0443\u0436\u0435 \u043e\u043f\u0438\u0441\u0430\u043b, \u0441\u0442\u0430\u0442\u0435\u0439 \u043e\u0431 OpenID \u043d\u0430 \u0445\u0430\u0431\u0440\u0435 \u0442\u0430\u043a \u0436\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e.<br \/>  2. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 API \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u044f \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438.<br \/>  \u042f \u043d\u0435 \u0431\u0443\u0434\u0443 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043f\u043b\u0430\u0433\u0438\u043d\u044b \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 CMS \u2014 \u043e\u043f\u0438\u0448\u0443 \u043b\u0438\u0448\u044c \u043e\u0431\u0449\u0443\u044e \u0441\u0445\u0435\u043c\u0443 \u0438 \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430.<\/p>\n<h4>\u0422\u0435\u043e\u0440\u0438\u044f<\/h4>\n<p>  \u0414\u043b\u044f \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442, \u0443 WG API, \u0435\u0441\u0442\u044c \u0442\u0440\u0438 \u043c\u0435\u0442\u043e\u0434\u0430:<br \/>  <a href=\"https:\/\/ru.wargaming.net\/developers\/api_reference\/wot\/auth\/login\/\">auth\/login<\/a> \u2014 \u043c\u0435\u0442\u043e\u0434 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u2014 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f access_token.<br \/>  <a href=\"https:\/\/ru.wargaming.net\/developers\/api_reference\/wot\/auth\/prolongate\/\">auth\/prolongate<\/a> \u2014 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u044d\u0442\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0434\u043b\u0438\u0442\u044c access_token \u0431\u0435\u0437 \u0443\u0447\u0430\u0441\u0442\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<br \/>  <a href=\"https:\/\/ru.wargaming.net\/developers\/api_reference\/wot\/auth\/logout\/\">auth\/logout<\/a> \u2014 \u043c\u0435\u0442\u043e\u0434 \u0434\u043b\u044f \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0435\u043d\u0438\u044f access_token<\/p>\n<p>  access_token \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e\u0431 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0435 \u0438\u0433\u0440\u043e\u043a\u0430 \u2014 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0442\u0435\u0445\u043d\u0438\u043a\u0435, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0435\u0441\u0442\u044c \u0432 \u0430\u043d\u0433\u0430\u0440\u0435, \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u043e\u0432 \u0434\u0440\u0443\u0437\u0435\u0439 \u0438\u0433\u0440\u043e\u043a\u0430 \u0438 \u043f\u0440\u043e\u0447\u0435\u0435.<\/p>\n<p>  \u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f access_token, \u043a\u0430\u043a \u0443\u0436\u0435 \u0441\u043a\u0430\u0437\u0430\u043d\u043e \u0432\u044b\u0448\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434 auth\/login, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0441\u0442\u0430\u0442\u0443\u0441\u0435 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c\u0443 \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0435 redirect_uri<\/p>\n<p>  \u041e\u0434\u0438\u043d \u0438\u0437 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 WG \u0441\u043e\u043e\u0431\u0449\u0438\u043b:  <\/p>\n<blockquote><p>\u041f\u0440\u0438\u043d\u044f\u0442\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043c\u0435\u0442\u043e\u0434\u0430 auth\/login \u0438 \u0431\u0443\u0434\u0435\u0442 \u0432\u0432\u0435\u0434\u0435\u043d\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 (\u043f\u0440\u0438 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0432\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0445 \u0441\u0432\u0435\u0434\u0435\u043d\u0438\u044f\u0445):<br \/>  1) \u041d\u0430 \u043e\u0434\u0438\u043d URL \u0431\u0443\u0434\u0435\u0442 \u0441\u0434\u0435\u043b\u0430\u043d\u0430 \u043f\u0435\u0440\u0435\u0430\u0434\u0440\u0435\u0441\u0430\u0446\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f;<br \/>  2) \u041d\u0430 \u0432\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u044b \u0441\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043f\u043e \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 (\u043c\u0435\u0442\u043e\u0434\u043e\u043c POST \u0438\u043b\u0438 GET).<\/p><\/blockquote>\n<p>  \u0412\u0435\u0440\u043d\u0435\u043c\u0441\u044f \u043a \u0442\u0435\u043e\u0440\u0438\u0438.<\/p>\n<h4>\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0440\u0430\u0431\u043e\u0442\u044b<\/h4>\n<p>  <\/p>\n<h5>\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0441\u0441\u044b\u043b\u043a\u0438 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/h5>\n<p>  \u041f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e, \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u043a \u043c\u0435\u0442\u043e\u0434\u0443 auth\/login \u0441 \u043f\u0440\u043e\u0441\u044c\u0431\u043e\u0439 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c URL \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0433\u043e \u0440\u0435\u0434\u0438\u0440\u0435\u043a\u0442\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<br \/>  \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0448\u043b\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441 \u043a<br \/>  <code>https:\/\/api.worldoftanks.ru\/wot\/auth\/login\/?application_id=&lt;application_id&gt;&redirect_uri=&lt;redirect_uri&gt;&nofollow=1<\/code><br \/>  , \u0433\u0434\u0435 <b>&lt;application_id&gt;<\/b> \u2014 application_id \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 <a href=\"http:\/\/ru.wargaming.net\/developers\/\">\u043a\u0430\u0431\u0438\u043d\u0435\u0442\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430<\/a>;<br \/>  <b>&lt;redirect_uri&gt;<\/b> \u2014 URL \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430;<br \/>  \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 nofollow=1, \u0447\u0442\u043e \u0431\u044b \u043c\u0435\u0442\u043e\u0434 \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0438\u043b URL \u0432 \u0442\u0435\u043b\u0435 \u043e\u0442\u0432\u0435\u0442\u0430 \u0432\u043c\u0435\u0441\u0442\u043e \u0440\u0435\u0434\u0438\u0440\u0435\u043a\u0442\u0430.<\/p>\n<p>  \u041d\u0430\u0448 auth.php \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0441\u0440\u0430\u0437\u0443 \u0434\u0432\u0435 \u0437\u0430\u0434\u0430\u0447\u0438: \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443 \u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c \u0440\u0435\u0434\u0438\u0440\u0435\u043a\u0442 \u043f\u043e \u043d\u0435\u0439, \u0438\u043b\u0438 \u0436\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e, \u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432\u0435\u0440\u043d\u0443\u043b\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u0440\u0435\u0434\u0438\u0440\u0435\u043a\u0442\u0430.<\/p>\n<h5>\u041f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043d\u0430 \u0441\u0430\u0439\u0442 WG<\/h5>\n<p>  \u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435, \u0441\u043a\u0440\u0438\u043f\u0442 \u0441\u0430\u043c \u0434\u0435\u043b\u0430\u0435\u0442 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043f\u043e\u0441\u043b\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0441\u0441\u044b\u043b\u043a\u0438.<br \/>  \u0418\u0437\u043c\u0435\u043d\u0438\u0432 \u043f\u0430\u0440\u0443 \u0441\u0442\u0440\u043e\u043a \u043a\u043e\u0434\u0430, \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0443\u0442\u0438\u0442\u044c \u044d\u0442\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e javascript, \u0434\u0430\u0431\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u00ab\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430&#8230;\u00bb (\u0438\u043b\u0438 \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c loader.gif) \u043f\u043e\u0441\u043b\u0435 \u043a\u043b\u0438\u043a\u0430 \u043f\u043e \u043a\u043d\u043e\u043f\u043a\u0435 \u00ab\u0412\u043e\u0439\u0442\u0438\u00bb \u2014 \u044d\u0442\u043e \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043a\u0440\u0430\u0441\u0438\u0432\u043e.<br \/>  \u0412 \u0442\u043e \u0432\u0440\u0435\u043c\u044f, \u043f\u043e\u043a\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432\u043e\u0441\u0445\u0438\u0449\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u0434\u043f\u0438\u0441\u044c\u044e (\u043d\u0443 \u0438\u043b\u0438 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u043e\u0439), js \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u043a \u0441\u043a\u0440\u0438\u043f\u0442\u0443, \u0442\u043e\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u043a api, api \u043e\u0442\u0432\u0435\u0442\u0438\u0442 \u0441\u043a\u0440\u0438\u043f\u0442\u0443, \u0441\u043a\u0440\u0438\u043f\u0442 \u0432\u0435\u0440\u043d\u0435\u0442 \u0441\u0441\u044b\u043b\u043a\u0443, \u0438 \u043d\u0430\u043a\u043e\u043d\u0435\u0446 \u0442\u0430\u043a\u0438 js \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u0438\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043f\u043e \u043d\u0435\u0439.<br \/>  \u041d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441 \u043a API js-\u043e\u043c \u043d\u0435\u043b\u044c\u0437\u044f, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c\u0438 WG DPP, \u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u043e \u0440\u0430\u0437\u0433\u043b\u0430\u0448\u0430\u0442\u044c application_id \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<h5>\u0412\u043e\u0437\u0432\u0440\u0430\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/h5>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u0438\u0433\u0440\u043e\u043a \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 WG \u0438 \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u0442 \u043d\u0430\u0448\u0435\u043c\u0443 \u0441\u0430\u0439\u0442\u0443 \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d \u043d\u0430 <br \/>  <b>&lt;redirect_uri&gt;<\/b>?&#038;status=ok&#038;access_token=<b>&lt;access_token&gt;<\/b>&#038;nickname=<b>&lt;_nickname&gt;<\/b>&#038;account_id=<b>&lt;account_id&gt;<\/b>&#038;expires_at=<b>&lt;expires_at&gt;<\/b><br \/>  \u0415\u0441\u043b\u0438 \u043d\u0435 \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043e\u0448\u0438\u0431\u043e\u043a\u2026<br \/>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043d\u0430\u0448 \u0441\u043a\u0440\u0438\u043f\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442 \u0434\u0430\u043d\u043d\u044b\u0435:<br \/>  status access_token nickname account_id expires_at<br \/>  \u041d\u043e \u043f\u043e\u043a\u0430 \u044d\u0442\u0438\u043c \u0434\u0430\u043d\u043d\u044b\u043c \u043d\u0435\u043b\u044c\u0437\u044f \u0434\u043e\u0432\u0435\u0440\u044f\u0442\u044c!<\/p>\n<h5>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u043f\u043e\u0441\u043b\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/h5>\n<p>  \u0415\u0441\u043b\u0438 \u043c\u044b \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u043c \u0434\u0435\u043b\u0430\u0442\u044c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e, \u0442\u043e \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u044b, \u0447\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0434\u0438\u0432\u044b \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u044b \u0438\u043c\u0435\u043d\u043d\u043e \u0441 \u0441\u0430\u0439\u0442\u0430 WG, \u0430 \u043d\u0435 \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0432\u0440\u0443\u0447\u043d\u0443\u044e.<br \/>  <i>\u0412\u043e\u0442 \u0438\u043c\u0435\u043d\u043d\u043e \u0438\u0437-\u0437\u0430 \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u0438 \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0435\u043b\u0430\u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0430 \u043c\u0435\u0442\u043e\u0434\u0430 \u2014 \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442, \u043c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u0442\u043e\u0447\u043d\u043e \u0437\u043d\u0430\u0442\u044c, \u043f\u0440\u0438\u0448\u0435\u043b \u043b\u0438 \u0438\u0433\u0440\u043e\u043a, \u0441 \u044d\u0442\u0438\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438, \u0441 \u0441\u0430\u0439\u0442\u0430 wargaming \u0438\u043b\u0438 \u0441\u0430\u043c \u043d\u0430\u0431\u0440\u0430\u043b \u0438\u0445 \u0432 \u0430\u0434\u0440\u0435\u0441\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435.<br \/>  <b> $_SERVER[&#8216;HTTP_REFERER&#8217;]<\/b> \u043d\u0435 \u0434\u0430\u0435\u0442 \u043f\u043e\u043b\u043d\u043e\u0439 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0438.<\/i><br \/>  \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0431\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0434\u0438\u0432\u043e\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u044b \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u043c\u0435\u0442\u043e\u0434\u043e\u043c auth\/prolongate<br \/>  <i>\u042d\u0442\u043e \u043e\u0434\u0438\u043d \u0438\u0437 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432. \u041a\u0440\u043e\u043c\u0435 \u043f\u0440\u043e\u043b\u043e\u043d\u0433\u0430 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0442\u0430\u043a \u0436\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 account\/info \u0441 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u043c \u0442\u043e\u043a\u0435\u043d\u043e\u043c \u2014 \u0435\u0441\u043b\u0438 \u0443\u0434\u0430\u0441\u0442\u0441\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u0437\u043d\u0430\u0447\u0438\u0442 \u0432\u0441\u0435 \u043e\u043a.<\/i><br \/>  \u0412\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0432\u0448\u0438\u0441\u044c \u0438\u043c \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043b\u0438 access_token \u0431\u044b\u043b \u043f\u0435\u0440\u0435\u0434\u0430\u043d, \u0438 \u043a\u043e\u043c\u0443 (account_id) \u043e\u043d \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0438\u0442.<br \/>  \u0415\u0441\u043b\u0438 \u0432\u0441\u0435 \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435, \u043c\u044b \u0437\u0430\u043f\u0438\u0448\u0435\u043c \u043d\u0443\u0436\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0411\u0414, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043a\u0443\u043a\u0438 \u2014 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0432\u0441\u0451 \u0442\u043e, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0441 \u0432\u0432\u043e\u0434\u043e\u043c \u043b\u043e\u0433\u0438\u043d\u0430\/\u043f\u0430\u0440\u043e\u043b\u044f.<\/p>\n<h4>\u041f\u0440\u0430\u043a\u0442\u0438\u043a\u0430<\/h4>\n<p>  <\/p>\n<pre><code class=\"php\">&lt;? define('URL','http:\/\/example.com\/WGDPPAuth.php');\/\/\u0430\u0434\u0440\u0435\u0441 \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0434\u0430\u043d\u043d\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 define('APPLICATION_ID','demo');\/\/application_id \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f if(empty($_GET['status'])){\/\/\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u0441\u0441\u044b\u043b\u043a\u0443 \u0438 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u044f\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \t$context = stream_context_create( \t\tarray('http' =&gt; \t\t\tarray( \t\t\t\t'method'  =&gt; 'POST', \t\t\t\t'header'  =&gt; 'Content-type: application\/x-www-form-urlencoded', \t\t\t\t'content' =&gt; http_build_query( \t\t\t\t\tarray( \t\t\t\t\t\t'nofollow' =&gt; 1, \t\t\t\t\t\t'expires_at' =&gt; 300, \t\t\t\t\t\t'redirect_uri' =&gt; URL, \t\t\t\t\t\t'application_id' =&gt; APPLICATION_ID \t\t\t\t\t) \t\t\t\t) \t\t\t) \t\t) \t); \t$data=json_decode(@file_get_contents('https:\/\/api.worldoftanks.ru\/wot\/auth\/login\/', false, $context),true); \tif($data['status']=='ok'){ \t\theader ('Location: '.$data['data']['location']); \t\texit(); \t}else{ \t\texit('\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f.'); \t} }elseif(isset($_GET['status']) && isset($_GET['access_token']) && isset($_GET['nickname']) && isset($_GET['account_id']) && isset($_GET['expires_at'])){\/\/\u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043f\u043e\u043f\u0430\u043b \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u043c\u0435\u0442\u043e\u0434 auth\/login \tif($_GET['status']!=&quot;ok&quot;){ \t\t$error_code=500; \t\tif(preg_match('\/^[0-9]+$\/u', $_GET['code'])){ \t\t\t$error_code=$_GET['code']; \t\t} \t\texit(&quot;\u041e\u0448\u0438\u0431\u043a\u0430 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438. \u041a\u043e\u0434 \u043e\u0448\u0438\u0431\u043a\u0438: $error_code&quot;); \t}elseif($_GET[expires_at]&lt;time()){ \t\texit(&quot;\u041e\u0448\u0438\u0431\u043a\u0430 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438. \u0421\u0440\u043e\u043a \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f access_token \u0438\u0441\u0442\u0435\u043a.&quot;); \t}else{ \t\t$context = stream_context_create( \t\t\tarray('http' =&gt; \t\t\t\tarray( \t\t\t\t\t'method'  =&gt; 'POST', \t\t\t\t\t'header'  =&gt; 'Content-type: application\/x-www-form-urlencoded', \t\t\t\t\t'content' =&gt; http_build_query( \t\t\t\t\t\tarray( \t\t\t\t\t\t\t'expires_at' =&gt; 14*24*60*60, \t\t\t\t\t\t\t'access_token' =&gt; $_GET['access_token'], \t\t\t\t\t\t\t'application_id' =&gt; APPLICATION_ID \t\t\t\t\t\t) \t\t\t\t\t) \t\t\t\t) \t\t\t) \t\t); \t\t$data=json_decode(@file_get_contents('https:\/\/api.worldoftanks.ru\/wot\/auth\/prolongate\/', false, $context),true);\/\/\u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u043c \u043f\u0440\u0430\u0432\u0434\u0438\u0432\u043e\u0441\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \t\tif($data['status']==&quot;ok&quot;){ \t\t\t$access_token=$data[data][access_token]; \t\t\t$expires_at=$data[data][expires_at]; \t\t\t$account_id=$data[data][account_id]; \t\t\t\/\/\u0437\u0434\u0435\u0441\u044c \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043a\u0443\u043a\u0438, \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0435\u0433\u043e \u0442\u043e\u043a\u0435\u043d \u0432 \u0411\u0414, \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0441\u0435 \u0442\u043e, \u0447\u0442\u043e \u0441\u043e\u0447\u0442\u0435\u0442\u0435 \u043d\u0443\u0436\u043d\u044b\u043c. \t\t\texit('\u042d\u0442\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0441 id &lt;b&gt;'.$account_id.'&lt;\/b&gt;&lt;br \/&gt;\u0422\u043e\u043a\u0435\u043d &lt;b&gt;'.$access_token.'&lt;\/b&gt;, \u043e\u043d \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d \u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0434\u043e &lt;b&gt;'.date(&quot;d.m.Y H:i:s&quot;,$expires_at).'&lt;\/b&gt;'); \t\t}else{ \t\t\texit('access_token \u043d\u0435 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d'); \t\t} \t} }else{ \t$error_code=500; \tif(preg_match('\/^[0-9]+$\/u', $_GET['code'])){ \t\t$error_code=$_GET['code']; \t} \texit(&quot;\u041f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430. \u041a\u043e\u0434 \u043e\u0448\u0438\u0431\u043a\u0438: $error_code&quot;); } ?&gt; <\/code><\/pre>\n<p>  <a href=\"http:\/\/project357.hol.es\/WGDPPAuth.php\">DEMO<\/a> \t\t\t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/233957\/\"> http:\/\/habrahabr.ru\/post\/233957\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\"> \t\t\t\u0421 \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u0432\u044b\u0445\u043e\u0434\u0430 WG P API \u0432 \u0431\u0435\u0442\u0430 \u0442\u0435\u0441\u0442, \u0441\u0430\u043c\u044b\u043c \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u043c \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u043c \u0441\u0442\u0430\u043b \u00ab\u043a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e \u043d\u0430 \u0441\u0430\u0439\u0442\u0435\u00bb.<br \/>  \u0422\u0430\u043a \u0443\u0436 \u0441\u043b\u043e\u0436\u0438\u043b\u043e\u0441\u044c \u2014 \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e \u043b\u0435\u043d\u0438\u0432\u043e\u0435.<br \/>  \u0414\u0430\u0431\u044b \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u0436\u0438\u0437\u043d\u044c \u0434\u0440\u0443\u0433\u0438\u043c \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0430\u043c Wargaming Developer Partner Program, \u0445\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441\u0432\u043e\u0438 \u043e\u043f\u044b\u0442\u043e\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u044f \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u0430.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-233957","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/233957","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=233957"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/233957\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=233957"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=233957"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=233957"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}