{"id":216227,"date":"2014-03-21T10:35:02","date_gmt":"2014-03-21T06:35:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=216227"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=216227","title":{"rendered":"<span class=\"post_title\">\u041f\u0438\u0448\u0435\u043c \u043f\u0430\u0440\u0441\u0435\u0440 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e XPath \u0438 Yii<\/span>"},"content":{"rendered":"<div class=\"content html_format\">\n<h5>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h5>\n<p>  \u0418\u043d\u043e\u0433\u0434\u0430 \u0431\u044b\u0432\u0430\u044e\u0442 \u0437\u0430\u0434\u0430\u0447\u0438 \u043a\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u0435\u0440\u0442\u043a\u0443 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 API \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u0434\u043b\u044f \u043d\u0443\u0436\u0434 \u0437\u0430\u043a\u0430\u0437\u0447\u0438\u043a\u0430 \u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u044e \u0437\u0430\u0434\u0430\u0447\u0443 \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e, \u043d\u043e \u0432 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0435\u0441\u0442\u044c \u044d\u0442\u043e\u0442 API, \u043b\u0438\u0431\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043c\u044b\u0441\u043b\u044c \u0447\u0442\u043e \u043b\u0443\u0447\u0448\u0435 \u0431\u044b \u0435\u0433\u043e \u043d\u0435 \u0431\u044b\u043b\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043f\u0430\u0440\u0441\u0438\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430.<\/p>\n<p>  \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u044b\u0434\u0430\u043d\u043d\u043e\u0435 <a href=\"http:\/\/9af5766eb2759a49.demo-xenforo.com\/130\/index.php\">\u0434\u0435\u043c\u043e<\/a> \u0444\u043e\u0440\u0443\u043c\u0430 XenForo \u0438 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0439 \u0442\u0435\u043c\u043e\u0439, \u043e\u0442\u043a\u0443\u0434\u0430 \u0431\u0443\u0434\u0435\u043c \u043f\u0430\u0440\u0441\u0438\u0442\u044c \u0442\u0438\u043f\u0438\u0447\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435: \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a, \u0432\u0440\u0435\u043c\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438 \u0441\u0430\u043c \u0442\u0435\u043a\u0441\u0442 \u0442\u0435\u043c\u044b, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043f\u0430\u0440\u0441\u0438\u043d\u0433 \u0431\u0443\u0434\u0435\u0442 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0432 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0435 \u0444\u043e\u0440\u0443\u043c\u0430. \u0412\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u0437\u044f\u0442\u044c \u043f\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0438.<\/p>\n<p>  \u0421\u0430\u043c \u043f\u0430\u0440\u0441\u0435\u0440 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0432 \u0432\u0438\u0434\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 Yii2.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h5>\u0427\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e<\/h5>\n<p>  <\/p>\n<ul>\n<li>\u0414\u043b\u044f \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 cURL \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0435\u0435 \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c.<\/li>\n<li>\u0422\u0430\u043a \u043a\u0430\u043a Yii \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u0441\u0438\u043b\u044c\u043d\u043e (\u0434\u043b\u044f \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430, \u0441\u0430\u043c\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430 \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 \u0438 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430), \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c \u0441\u0430\u043c\u043e\u0433\u043e \u043f\u0430\u0440\u0441\u0435\u0440\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447\u0438 \u0432\u043f\u043e\u043b\u043d\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/github.com\/samdark\/yii2-minimal\">Yii2 minimal<\/a>.<\/li>\n<\/ul>\n<p>  <\/p>\n<h5>\u041d\u0430\u0447\u043d\u0435\u043c<\/h5>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 ParserXenforo. \u0422\u0430\u043a \u043a\u0430\u043a \u043d\u0430\u043c \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e, \u0432\u043f\u043e\u043b\u043d\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u0442 Object.<\/p>\n<pre><code class=\"php\">&lt;?php  namespace app\\components;  use Yii; use \\yii\\base\\Object;  class ParserXenforo extends Object { } <\/code><\/pre>\n<p>  \u041d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0438 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b. \u0421\u0430\u043c\u0438 \u0436\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 host, username, password, curlOpt, \u0431\u0443\u0434\u0443\u0442 \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430.<\/p>\n<pre><code class=\"php\">&lt;?php  namespace app\\components;  use Yii; use \\yii\\base\\Object;  class ParserXenforo extends Object { \t\/** \t * Uri \u043a \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044e \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 \u0444\u043e\u0440\u0443\u043c\u0435 \t *\/ \tconst REQUEST_URI_LOGIN = 'login\/login'; \t\/** \t * \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430 \u0434\u043b\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f cookies \t *\/ \tconst COOKIES_FILE_NAME = 'cookies.txt'; \t\/** \t * @var string \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \t *\/ \tprivate $_data; \t\/** \t * @var string \u0445\u043e\u0441\u0442 \u0444\u043e\u0440\u0443\u043c\u0430 \t *\/ \tpublic $host; \t\/** \t * @var string \u043b\u043e\u0433\u0438\u043d \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \t *\/ \tpublic $username; \t\/** \t * @var string \u043f\u0430\u0440\u043e\u043b\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \t *\/ \tpublic $password; \t\/** \t * @var array \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f cURL \t *\/ \tpublic $curlOpt; } <\/code><\/pre>\n<p>  \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u043c\u0435\u0442\u043e\u0434\u044b \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b.<br \/>  \u041f\u0435\u0440\u0432\u044b\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u043c\u0435\u0442\u043e\u0434 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 header \u0438 user-agent \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u0432 curlOpt, \u0438 \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b cURL<\/p>\n<pre><code class=\"php\">protected function getCurlOpt($nameOpt) { \tif ($nameOpt !== 'userAgent' && $nameOpt !== 'header') { \t\treturn false; \t} \treturn $this-&gt;curlOpt[$nameOpt]; } <\/code><\/pre>\n<p>  \u0414\u043b\u044f \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 \u0444\u043e\u0440\u0443\u043c\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 POST \u043b\u043e\u0433\u0438\u043d \u0438 \u043f\u0430\u0440\u043e\u043b\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c url \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 (host + url \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438)<\/p>\n<pre><code class=\"php\">protected function getLoginUrl() { \treturn $this-&gt;host . self::REQUEST_URI_LOGIN; } <\/code><\/pre>\n<p>  \u0418 \u0441\u0442\u0440\u043e\u043a\u0443 POST \u0437\u0430\u043f\u0440\u043e\u0441\u0430<\/p>\n<pre><code class=\"php\">protected function createPostRequestForCurl() { \treturn 'login=' . $this-&gt;username . '&password=' . $this-&gt;password . '&remember=1'; } <\/code><\/pre>\n<p>  \u0414\u043b\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b \u0441 cookies \u0432 runtime. \u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u043d\u043e\u0433\u043e \u043f\u0443\u0442\u0438 \u044d\u0442\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430, \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043c\u0435\u0442\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0441 alias \u043f\u0443\u0442\u0438 \u043f\u043e\u043b\u043d\u044b\u0439 \u043f\u0443\u0442\u044c \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043a \u043d\u0435\u043c\u0443 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430.<\/p>\n<pre><code class=\"php\">protected function getPathToCookieFile($cookieFileName = self::COOKIES_FILE_NAME) { \treturn Yii::getAlias('@app\/runtime') . DIRECTORY_SEPARATOR . $cookieFileName; } <\/code><\/pre>\n<p>  \u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u043c\u0435\u0442\u043e\u0434 \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0441 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u044b \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043d\u0430 action \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0433\u0434\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c POST \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u0441\u044f \u043d\u0430 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u0439 url \u043d\u043e \u0443\u0436\u0435 \u0432 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0435. \u041d\u0430 \u0432\u0441\u044f\u043a\u0438\u0439 \u0441\u043b\u0443\u0447\u0430\u0439. \u0422\u0430\u043a \u043a\u0430\u043a \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0447\u0430\u0441\u0442\u043e \u0432\u0438\u0434\u0435\u043b \u0447\u0442\u043e \u043d\u0430 \u044d\u0442\u043e\u043c \u0444\u043e\u0440\u0443\u043c\u0435 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044e\u0442 \u043c\u043e\u0434\u0443\u043b\u044c \u0441\u043a\u0440\u044b\u0442\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 \u043e\u0442 \u043d\u0435\u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.<br \/>  \u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 _data, \u043b\u043e\u0433\u0438\u0440\u0443\u0435\u043c \u043c\u0435\u0442\u043e\u0434\u043e\u043c Yii::info() \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0435.<\/p>\n<pre><code class=\"php\">public function loadUsingCurl($url) { \t$ch = curl_init(); \tcurl_setopt($ch, CURLOPT_URL, $this-&gt;loginUrl); \tcurl_setopt($ch, CURLOPT_FAILONERROR, 1); \tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); \tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); \tcurl_setopt($ch, CURLOPT_REFERER, $url); \tcurl_setopt($ch, CURLOPT_HTTPHEADER, $this-&gt;getCurlOpt('header')); \tcurl_setopt($ch, CURLOPT_COOKIEFILE, $this-&gt;pathToCookieFile); \tcurl_setopt($ch, CURLOPT_COOKIEJAR, $this-&gt;pathToCookieFile); \tcurl_setopt($ch, CURLOPT_FRESH_CONNECT, 1); \tcurl_setopt($ch, CURLOPT_USERAGENT, $this-&gt;getCurlOpt('userAgent')); \tcurl_setopt($ch, CURLOPT_POST, 1); \tcurl_setopt($ch, CURLOPT_POSTFIELDS, $this-&gt;createPostRequestForCurl()); \t$this-&gt;_data = curl_exec($ch); \tif (curl_exec($ch) === false) { \t\tthrow new \\Exception(curl_errno($ch) . ': ' . curl_error($ch)); \t} \tcurl_close($ch);  \tYii::info(Yii::t('app', 'Loading data page'));  \treturn $this; } <\/code><\/pre>\n<p>  \u0411\u0430\u0437\u043e\u0432\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u0430\u044f. \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0443\u0436\u043d\u043e \u0435\u0433\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u0445 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c. \u0423\u043a\u0430\u0437\u0430\u0432 \u0432 user-agent \u0434\u0430\u043d\u043d\u044b\u0435 \u0441\u0432\u043e\u0435\u0433\u043e \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0433\u0434\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442, \u0431\u0430\u0437\u043e\u0432\u044b\u0439 url \u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438.<br \/>  \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043b\u0438 \u0432 \u0434\u0435\u043c\u043e admin:admin. \u041e\u0434\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u043e \u0434\u0430\u043b\u0438 \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u043d\u0435\u0439, \u0430 \u0442\u043e\u0447\u043d\u0435\u0435 \u0434\u043e Mar 24, 2014 at 7:26 AM<\/p>\n<pre><code class=\"php\">.... 'components' =&gt; [ \t... \t'parser' =&gt; [ \t\t'class' =&gt; 'app\\components\\ParserXenforo', \t\t'host' =&gt; 'http:\/\/9af5766eb2759a49.demo-xenforo.com\/130\/index.php', \t\t'username' =&gt; 'admin', \t\t'password' =&gt; 'admin', \t\t'curlOpt' =&gt; [ \t\t\t'userAgent' =&gt; 'Mozilla\/5.0 (X11; Linux x86_64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/31.0.1650.57 Safari\/537.36', \t\t\t'header' =&gt; [ \t\t\t\t'Accept: text\/html, application\/xml;q=0.9, application\/xhtml+xml, image\/png, image\/jpeg, image\/gif, image\/x-xbitmap, *\/*;q=0.1', \t\t\t\t'Accept-Language: en-US,en;q=0.8,ru;q=0.6,uk;q=0.4', \t\t\t\t'Accept-Charset: Windows-1251, utf-8, *;q=0.1', \t\t\t\t'Accept-Encoding: deflate, identity, *;q=0', \t\t\t] \t\t] \t], \t... ], ....\t <\/code><\/pre>\n<p>  \u0412 \u043a\u043e\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0435 \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c, \u0432\u044b\u0437\u0432\u0430\u0432 \u0432 action \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 \u043b\u043e\u0433\u0430\u0445 app.log \u0432\u0441\u0435 \u043b\u0438 \u0445\u043e\u0440\u043e\u0448\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b\u043e\u0441\u044c<\/p>\n<pre><code class=\"php\">$urlThread = 'http:\/\/9af5766eb2759a49.demo-xenforo.com\/130\/index.php?threads\/some-thread.1\/'; \/** @var \\app\\components\\ParserXenforo $dataParse *\/ $dataParse = Yii::$app-&gt;parser-&gt;loadUsingCurl($urlThread); <\/code><\/pre>\n<h5>\u041f\u0430\u0440\u0441\u0438\u043d\u0433 \u0434\u0430\u043d\u043d\u044b\u0445<\/h5>\n<p>  \u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043c\u0435\u0442\u043e\u0434\u0430 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u043a\u043b\u0430\u0441\u0441\u0430 DOMDocument \u043d\u0430\u0448\u0435\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0435\u0433\u043e. \u041f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0432 \u043e\u0448\u0438\u0431\u043a\u0438 libxml \u0438 \u0434\u0435\u043b\u0430\u0435\u043c \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0435 \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438. \u0427\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0441 \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u043e\u043c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b. \u0412 \u0438\u0442\u043e\u0433\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c DOM \u043d\u0430\u0448\u0435\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043d\u0438\u043c. \u0422\u0430\u043a \u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f. \u041d\u043e \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 DOM \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0431\u043e\u043b\u0435\u0435 \u0443\u0434\u043e\u0431\u043d\u0430\u044f.<\/p>\n<pre><code class=\"php\">public function createDomDocument() { \t$this-&gt;_dom = new \\DOMDocument(); \tlibxml_use_internal_errors(true); \tif ($this-&gt;_dom-&gt;loadHTML($this-&gt;_data)) { \t\tYii::info(Yii::t('app', 'Create DomDocument')); \t} else { \t\tYii::info(Yii::t('app', 'An error occurred when creating an object of class DOMDocument')); \t} \tlibxml_use_internal_errors(false);  \treturn $this; } <\/code><\/pre>\n<p>  \u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u043c\u0435\u0442\u043e\u0434\u0443 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u043a\u043b\u0430\u0441\u0441\u0430 DOMXPath, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u043b\u043e \u0443\u0434\u043e\u0431\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0435 XPath \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<pre><code class=\"php\">public function createDomXpath() { \t$this-&gt;_xpath = new \\DOMXPath($this-&gt;_dom);  \tYii::info(Yii::t('app', 'Create DomXpath'));  \treturn $this; } <\/code><\/pre>\n<p>  \u041d\u0443 \u0432\u0441\u0435 \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0441\u043c\u0435\u043b\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c \u043a \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044e XPath \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u0430\u0448\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445:title, timestamp \u0438 content.<br \/>  \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e _title<\/p>\n<pre><code class=\"php\">public function parseTitle() { \t$xpathQuery = '*\/\/h1'; \t$nodes = $this-&gt;_xpath-&gt;query($xpathQuery, $this-&gt;_dom); \tif ($nodes-&gt;length === 0) { \t\tYii::info(Yii::t('app', 'Error parse title'));\t \t} \t$this-&gt;_title = $nodes-&gt;item(0)-&gt;nodeValue;  \tYii::info(Yii::t('app', 'Parse title'));  \treturn $this; } <\/code><\/pre>\n<p>  \u0414\u0430\u043b\u044c\u0448\u0435 timestamp \u043d\u0430\u0448\u0435\u0439 \u0442\u0435\u043c\u044b<\/p>\n<pre><code class=\"php\">public function parseTimestamp() { \t$xpathQuery = '*\/\/p[@id=&quot;pageDescription&quot;]\/a\/abbr'; \t$nodes = $this-&gt;_xpath-&gt;query($xpathQuery, $this-&gt;_dom); \tif ($nodes-&gt;length === 0) { \t\tYii::info(Yii::t('app', 'Error parse timestamp')); \t\treturn $this; \t} \t\/\/ \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 timestamp \t$this-&gt;_timestamp = $nodes-&gt;item(0)-&gt;getAttribute('data-time');  \tYii::info(Yii::t('app', 'Parse timestamp'));  \treturn $this; } <\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043a\u043e\u043d\u0442\u0435\u043d\u0442<\/p>\n<pre><code class=\"php\">public function parseContent() { \t$xpathQuery = '*\/\/blockquote[@class=&quot;messageText ugc baseHtml&quot;]'; \t$nodes = $this-&gt;_xpath-&gt;query($xpathQuery, $this-&gt;_dom); \tif ($nodes-&gt;length === 0) { \t\tYii::info(Yii::t('app', 'Error parse content')); \t\treturn $this; \t} \t$this-&gt;_content = $nodes-&gt;item(0)-&gt;nodeValue;  \tYii::info(Yii::t('app', 'Parse content'));  \treturn $this; } <\/code><\/pre>\n<p>  \u0412\u0435\u0440\u0442\u0430\u0435\u043c\u0441\u044f \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043d\u0430\u0437\u0430\u0434 \u0438 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e, \u0447\u0442\u043e \u0437\u0430 XPath \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438  <\/p>\n<ul>\n<li>&#8216;*\/\/h1&#8217; \u0438\u0449\u0435\u043c \u0432 DOM h1. *\/\/ \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0438\u0441\u043a\u0430\u0442\u044c \u043f\u043e \u0432\u0441\u0435\u043c\u0443 DOM<\/li>\n<li>*\/\/p[<a href=\"http:\/\/habrahabr.ru\/users\/id\/\" class=\"user_link\">id<\/a>=\u00abpageDescription\u00bb]\/a\/abbr \u0438\u0449\u0435\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442 p c id pageDescription \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0435\u0441\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0430 \u0441 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u043c abbr<\/li>\n<li>*\/\/blockquote[<a href=\"http:\/\/habrahabr.ru\/users\/class\/\" class=\"user_link\">class<\/a>=\u00abmessageText ugc baseHtml\u00bb] \u0438\u0449\u0435\u043c \u0446\u0438\u0442\u0430\u0442\u0443 \u0441 class messageText ugc baseHtml<\/li>\n<\/ul>\n<p>  C\u043e\u0437\u0434\u0430\u043d\u0438\u043c \u043c\u0435\u0442\u043e\u0434 \u0434\u043b\u044f \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 (\u043c\u043e\u0436\u0435\u0442 \u0438 \u043e\u043d \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0443\u0436\u0435\u043d \u043d\u043e \u0432\u0441\u0435 \u0436\u0435 \u0431\u043e\u043b\u0435\u0435 \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u0438\u0434\u043d\u043e \u0447\u0442\u043e \u043f\u0430\u0440\u0441\u0438\u043d\u0433 \u0434\u0430\u043d\u043d\u044b\u0445 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d \u0438 \u0432\u0441\u0435 \u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438), \u0430 \u0442\u0430\u043a\u0436\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u043c \u0434\u0430\u043d\u043d\u044b\u043c<\/p>\n<pre><code class=\"php\">\/**  * @return \\app\\components\\ParserXenforo  *\/ public function endParse() { \tif (isset($this-&gt;_content, $this-&gt;_timestamp, $this-&gt;_content)) { \t\tYii::info(Yii::t('app', 'End parse')); \t} else { \t\tYii::info(Yii::t('app', 'Some data were not received')); \t}  \treturn $this; }  \/**  * @return string title  *\/ public function getTitle() { \treturn $this-&gt;_title; }  \/**  * @return int timestamp  *\/ public function getTimestamp() { \treturn $this-&gt;_timestamp; }  \/**  * @return string content  *\/ public function getContent() { \treturn $this-&gt;_content; } <\/code><\/pre>\n<h5>\u0412\u044b\u0432\u043e\u0434 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432<\/h5>\n<p>  \u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0447\u0442\u043e \u0433\u043e\u0442\u043e\u0432, \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043a\u0430\u043a \u043e\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u0432 action \u043d\u0430\u0448\u0435\u0433\u043e controller \u043d\u0435\u043e\u0431\u0445\u0438\u0431\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0430 view \u0438\u0445 \u0432\u044b\u0432\u043e\u0434<\/p>\n<pre><code class=\"php\">$urlThread = 'http:\/\/9af5766eb2759a49.demo-xenforo.com\/130\/index.php?threads\/some-thread.1\/'; \/** @var \\app\\components\\ParserXenforo $dataParse *\/ $dataParse = Yii::$app-&gt;parser \t-&gt;loadUsingCurl($urlThread) \t-&gt;createDomDocument() \t-&gt;createDomXpath() \t-&gt;parseTitle() \t-&gt;parseTimeStamp() \t-&gt;parseContent() \t-&gt;endParse(); return $this-&gt;render('index', ['data' =&gt; $dataParse]); <\/code><\/pre>\n<pre><code class=\"php\">&lt;?php \/**  * @var yii\\web\\View $this  * @var \\app\\components\\ParserXenforo $data  *\/ $this-&gt;title = 'My Yii Application'; ?&gt; &lt;div class=&quot;site-index&quot;&gt; \t&lt;h1&gt;&lt;?= $data-&gt;title; ?&gt;&lt;\/h1&gt; \t&lt;p&gt;Created At: &lt;?= date('Y-m-d H:i:s', $data-&gt;timestamp); ?&gt;&lt;\/p&gt; \t&lt;p&gt;&lt;?= $data-&gt;content; ?&gt;&lt;\/p&gt; &lt;\/div&gt; <\/code><\/pre>\n<p>  \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<br \/>  <img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/06a\/245\/95c\/06a24595c7fa4eb5b0a8638f27c668c7.png\" alt=\"image\"\/><\/p>\n<h5>\u0412\u044b\u0432\u043e\u0434<\/h5>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u043a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0430\u0440\u0441\u0435\u0440 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0432 \u0432\u0438\u0434\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0434\u043b\u044f Yii \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 \u0442\u0435\u043c\u044b \u0444\u043e\u0440\u0443\u043c\u0430 XenForo.<br \/>  \u041f\u043e-\u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0430\u0440\u0441\u0438\u043d\u0433 \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u0438\u043b\u0438 \u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0434\u0440\u0443\u0433\u043e\u0439 \u043a\u043b\u0430\u0441\u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u043d\u0430\u043c\u0438 \u0434\u043b\u044f \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0432\u0441\u0435\u0445 \u0442\u0435\u043c \u0444\u043e\u0440\u0443\u043c\u0430, \u043f\u043e-\u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0443:  <\/p>\n<ul>\n<li>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u0430\u0433\u0438\u043d\u0430\u0446\u0438\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c.<\/li>\n<li>\u041f\u0440\u043e\u0445\u043e\u0434\u0438\u043c\u0441\u044f \u043f\u043e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u0445 \u043f\u043e\u043b\u0443\u0447\u0430\u044f \u0441\u0441\u044b\u043b\u043a\u0438 \u0442\u0435\u043c \u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0432 \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435<\/li>\n<li>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043a\u043e\u043d\u0442\u0435\u043d\u0442 \u043f\u043e \u044d\u0442\u0438\u043c \u0441\u0441\u044b\u043b\u043a\u0430\u043c.<\/li>\n<\/ul>\n<p>  \u0422\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u0441\u043f\u0435\u043a\u0442 \u043d\u0435 \u0431\u044b\u043b \u0437\u0430\u0442\u0440\u043e\u043d\u0443\u0442 \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, \u0441\u0442\u0430\u0442\u044c\u044f \u0431\u044b\u043b\u0430 \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u043c\u0435\u043d\u0435\u0435 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043a\u0430\u043a \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b.<br \/>  \u0421\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043a\u043e\u0434 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u0445.<\/p>\n<h5>\u0420\u0435\u0441\u0443\u0440\u0441\u044b<\/h5>\n<p>  <a href=\"http:\/\/rmcreative.ru\/blog\/post\/yii2-minimal\">\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 Yii2 minimal<\/a><br \/>  <a href=\"https:\/\/github.com\/yiisoft\/yii2\/blob\/master\/docs\/guide\/index.md\">\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f Yii2<\/a><br \/>  <a href=\"http:\/\/citforum.ru\/internet\/xpath\/index.shtml\">\u0421\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f xpath 1.0 \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u043c<\/a><br \/>  <a href=\"https:\/\/github.com\/demetrodon\/parser-xenforo\">\u0420\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c<\/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\/216227\/\"> http:\/\/habrahabr.ru\/post\/216227\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">\n<h5>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h5>\n<p>  \u0418\u043d\u043e\u0433\u0434\u0430 \u0431\u044b\u0432\u0430\u044e\u0442 \u0437\u0430\u0434\u0430\u0447\u0438 \u043a\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u0435\u0440\u0442\u043a\u0443 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 API \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u0434\u043b\u044f \u043d\u0443\u0436\u0434 \u0437\u0430\u043a\u0430\u0437\u0447\u0438\u043a\u0430 \u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u044e \u0437\u0430\u0434\u0430\u0447\u0443 \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e, \u043d\u043e \u0432 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0435\u0441\u0442\u044c \u044d\u0442\u043e\u0442 API, \u043b\u0438\u0431\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043c\u044b\u0441\u043b\u044c \u0447\u0442\u043e \u043b\u0443\u0447\u0448\u0435 \u0431\u044b \u0435\u0433\u043e \u043d\u0435 \u0431\u044b\u043b\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043f\u0430\u0440\u0441\u0438\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430.<\/p>\n<p>  \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u044b\u0434\u0430\u043d\u043d\u043e\u0435 <a href=\"http:\/\/9af5766eb2759a49.demo-xenforo.com\/130\/index.php\">\u0434\u0435\u043c\u043e<\/a> \u0444\u043e\u0440\u0443\u043c\u0430 XenForo \u0438 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0439 \u0442\u0435\u043c\u043e\u0439, \u043e\u0442\u043a\u0443\u0434\u0430 \u0431\u0443\u0434\u0435\u043c \u043f\u0430\u0440\u0441\u0438\u0442\u044c \u0442\u0438\u043f\u0438\u0447\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435: \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a, \u0432\u0440\u0435\u043c\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438 \u0441\u0430\u043c \u0442\u0435\u043a\u0441\u0442 \u0442\u0435\u043c\u044b, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043f\u0430\u0440\u0441\u0438\u043d\u0433 \u0431\u0443\u0434\u0435\u0442 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0432 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0435 \u0444\u043e\u0440\u0443\u043c\u0430. \u0412\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u0437\u044f\u0442\u044c \u043f\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0438.<\/p>\n<p>  \u0421\u0430\u043c \u043f\u0430\u0440\u0441\u0435\u0440 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0432 \u0432\u0438\u0434\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 Yii2.  <\/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-216227","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/216227","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=216227"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/216227\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=216227"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=216227"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=216227"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}