{"id":298109,"date":"2020-02-03T09:00:22","date_gmt":"2020-02-03T09:00:22","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=298109"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=298109","title":{"rendered":"Instagram api \u043d\u0430 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u043a\u0430\u0445"},"content":{"rendered":"\n<div class=\"post__text post__text-html\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/486714\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/1s\/vf\/ci\/1svfciotfmi1cn3nyrdc5_leypq.jpeg\" alt=\"image\"\/><\/p>\n<p>  \u0412\u0441\u0435 \u043d\u0430\u0447\u0430\u043b\u043e\u0441\u044c \u0441 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u044f \u0437\u0430\u0445\u043e\u0442\u0435\u043b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043a\u0430\u043d\u0430\u043b \u0432 \u0438\u043d\u0441\u0442\u0430\u0433\u0440\u0430\u043c\u0435 \u043f\u043e\u0442\u0440\u0430\u0442\u0438\u0432 \u043d\u0430 \u043f\u043e\u0438\u0441\u043a\u0438 \u0438 \u0442\u0435\u0441\u0442\u044b \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0430\u0432\u0442\u043e \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0439 \u0446\u0435\u043b\u044b\u0439 \u0434\u0435\u043d\u044c, \u0434\u0430\u043b\u0435\u0435 \u044f \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u043f\u0430\u043a\u0435\u0442\u044b \u0433\u0438\u0442\u0445\u0430\u0431\u0430 \u044f \u0443\u0434\u0438\u0432\u0438\u043b\u0441\u044f \u043d\u0430 \u0440\u0430\u0437\u043c\u0435\u0440 \u043a\u043e\u0434\u0430 \u044d\u0442\u0438\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 (\u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0438 php \u043c\u0435\u043d\u044c\u0448\u0435 \u0447\u0435\u043c \u044d\u0442\u0438 \u043e\u0431\u0435\u0440\u0442\u043a\u0438 \u043d\u0430\u0434 \u0438\u043d\u0441\u0442\u0430\u0433\u0440\u0430\u043c\u043e\u043c), \u044f \u043f\u043b\u044e\u043d\u0443\u043b \u0438 \u0440\u0435\u0448\u0438\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u044e \u043e\u0431\u0435\u0440\u0442\u043a\u0443 \u0441 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c\u0438.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h2>\u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f<\/h2>\n<p>  \u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e \u0431\u0443\u0434\u0435\u043c \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442\u044c \u0447\u0435\u0440\u0435\u0437 WEB \u0432\u0435\u0440\u0441\u0438\u044e. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0441 \u043d\u0430\u0447\u0430\u043b\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438, \u043a\u0443\u043a\u0438.<\/p>\n<pre><code class=\"php\">\/** \u041e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c GET \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430  https:\/\/www.instagram.com**\/  $curl = curl_init();  curl_setopt_array($curl, [         CURLOPT_URL =&gt; 'https:\/\/www.instagram.com\/',         CURLOPT_HEADER =&gt; true,         CURLOPT_SSL_VERIFYHOST =&gt; false,         CURLOPT_SSL_VERIFYPEER =&gt; false,         CURLOPT_RETURNTRANSFER =&gt; true,         CURLINFO_HEADER_OUT =&gt; true,         CURLOPT_HTTPHEADER =&gt; ['user-agent: Mozilla\/5.0 (Windows NT 10.0; Win64; x64)          AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/79.0.3945.130 Safari\/537.36'],  ]);  $response = curl_exec($curl);  $headers  = curl_getinfo($curl);  \/** \u043e\u0431\u0440\u0435\u0437\u0430\u0435\u043c \u043b\u0438\u0448\u043d\u0435\u0435 \u0438\u0437 headers **\/  $header_content = substr($response, 0, $headers['header_size']);  curl_close($curl); \/** \u0414\u043b\u044f \u043d\u0430\u0441 \u0432\u0430\u0436\u0435\u043d \u043a\u0443\u043a\u0438\u0441 csrftoken&lt;\/b&gt;, \u0435\u0433\u043e \u043c\u044b \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0432 header x-csrftoken \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438.   \u041f\u0430\u0440\u0441\u0438\u043c \u043a\u0443\u043a\u0438: **\/ $cookie = []; preg_match_all(&quot;\/Set-Cookie:\\s*(?&lt;cookie&gt;[^=]+=[^;]+)\/mi&quot;, $header_content, $matches); foreach ($matches['cookie'] as $c) {             if ($c = str_replace(['sessionid=&quot;&quot;', 'target=&quot;&quot;'], '', $c)) {                 $c = explode('=', $c);                 $cookie = array_merge($cookie, [trim($c[0]) =&gt; trim($c[1])]);             }         } if (isset($cookie['csrftoken']) { \/** \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0432\u0435\u0440\u043d\u0443\u043b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b \u043d\u0430\u043c \u0438\u043d\u0441\u0442\u0430\u0433\u0440\u0430\u043c \u043a\u0443\u043a\u0438\u0441 csrftoken \u0435\u0441\u043b\u0438 \u043d\u0435\u0442 \u043a\u0443\u043a\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0432\u0430\u0448 IP \u0438\u043b\u0438 \u041f\u0440\u043e\u043a\u0441\u0438 \u0432 \u0447\u0435\u0440\u043d\u044b\u0445 \u0441\u043f\u0438\u0441\u043a\u0430\u0445. **\/ } <\/code><\/pre>\n<p>  \u0414\u0430\u043b\u044c\u0448\u0435 \u044f \u043d\u0435 \u0431\u0443\u0434\u0443 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0441 \u0440\u0430\u0431\u043e\u0442\u043e\u0439 CURL.<\/p>\n<p>  \u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f:<\/p>\n<pre><code class=\"php\">\/** \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c POST \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 https:\/\/www.instagram.com\/accounts\/login\/ajax\/ **\/ POST      https:\/\/www.instagram.com\/accounts\/login\/ajax\/  HEADER      Content-Type: application\/x-www-form-urlencoded     \/** id app \u043c\u043e\u0436\u043d\u043e \u0432\u0437\u044f\u0442\u044c \u0438\u0437 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432 \u0438\u043d\u0441\u0442\u0430\u0433\u0440\u0430\u043c (\u043d\u0435 \u0441\u0442\u0430\u043b \u0438\u0441\u043a\u0430\u0442\u044c \u043a\u0430\u043a\u0438\u043c \u0445\u0443\u043a\u043e\u043c \u043e\u043d \u0441\u0442\u0430\u0432\u0438\u0442\u0441\u044f)  \u043e\u043d \u0432\u0441\u0435\u0433\u0434\u0430 \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 **\/      x-ig-app-id: 1217981644879628      x-csrftoken: \/** \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u0440\u0430\u043d\u0435\u0435 \u043a\u0443\u043a\u0438\u0441 csrftoken **\/      cookie: \/** \u0412\u0441\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u043a\u0443\u043a\u0438 \u0440\u0430\u043d\u0435\u0435 **\/      user-agent: \/** \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0440\u0430\u043d\u0435\u0435 **\/ BODY      username=\/** \u043b\u043e\u0433\u0438\u043d \u0438\u043d\u0441\u0442\u0430\u0433\u0440\u0430\u043c **\/&password=\/** \u043f\u0430\u0440\u043e\u043b\u044c \u0438\u043d\u0441\u0442\u0430\u0433\u0440\u0430\u043c **\/&queryParams={}&optIntoOneTap=false  \/** \u0415\u0441\u043b\u0438 \u0437\u0430\u043f\u0440\u043e\u0441 \u043f\u0440\u043e\u0448\u0435\u043b \u0443\u0434\u0430\u0447\u043d\u043e \u0438 \u043c\u044b \u0410\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u043e\u0442\u0432\u0435\u0442 json, \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u043a\u0443\u043a\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0435\u0440\u043d\u0443\u043b \u043d\u0430\u043c \u0441\u0435\u0440\u0432\u0435\u0440 \u0438  userId **\/ {&quot;authenticated&quot;: true, &quot;user&quot;: true, &quot;userId&quot;: &quot;****&quot;, &quot;loginNonce&quot;: &quot;****&quot;, &quot;reactivated&quot;: true, &quot;status&quot;: &quot;ok&quot;}  \/** \u0415\u0441\u043b\u0438 \u043d\u0435\u0432\u0435\u0440\u043d\u044b\u0439 \u043b\u043e\u0433\u0438\u043d \u0438\u043b\u0438 \u043f\u0430\u0440\u043e\u043b\u044c \u043e\u0442\u0432\u0435\u0442 json **\/ {&quot;authenticated&quot;: false, &quot;user&quot;: true, &quot;status&quot;: &quot;ok&quot;}  \/** \u0412 \u043b\u044e\u0431\u044b\u0445 \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u0435\u0441\u043b\u0438 \u043e\u0442\u0432\u0435\u0442 \u043d\u0435 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 json \u0438 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0440\u0435\u0434\u0438\u0440\u0435\u043a\u0442\u044b (\u0432\u044b \u0447\u0442\u043e \u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442\u0435 \u043d\u0435 \u0442\u0430\u043a) **\/ <\/code><\/pre>\n<p>  <\/p>\n<h2>\u041f\u043e\u0438\u0441\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439<\/h2>\n<p>  \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u044e\u0442\u0441\u044f \u0440\u0430\u043d\u0435\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u043a\u0443\u043a\u0438 \u0438 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a x-csrftoken.<\/p>\n<pre><code class=\"php\">\/** \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c POST \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 https:\/\/www.instagram.com\/web\/search\/topsearch\/ **\/ GET      https:\/\/www.instagram.com\/web\/search\/topsearch\/?context=blended&query={\u043a\u043b\u044e\u0447 \u043f\u043e\u0438\u0441\u043a\u0430}&rank_token={\u0440\u0430\u043d\u0434\u043e\u043c\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e 0.87979}&include_ree=true HEADER      x-csrftoken: \/** \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u0440\u0430\u043d\u0435\u0435 \u043a\u0443\u043a\u0438\u0441 csrftoken **\/      x-ig-app-id: 1217981644879628      cookie: \/** \u0412\u0441\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u043a\u0443\u043a\u0438 \u0440\u0430\u043d\u0435\u0435 **\/      user-agent: \/** \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0440\u0430\u043d\u0435\u0435 **\/ \/** \u041e\u0442\u0432\u0435\u0442 \u043e\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 **\/  {     &quot;users&quot;: [                  {&quot;position&quot;:0,                     &quot;user&quot;:{                                &quot;pk&quot;:&quot;\u0438\u0434 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f&quot;                                &quot;username&quot;:&quot;\u043b\u043e\u0433\u0438\u043d \u0432 \u0438\u043d\u0441\u0442\u0430\u0433\u0440\u0430\u043c&quot;                                &quot;full_name&quot;:&quot;\u0418\u043c\u044f \u0424\u0430\u043c\u0438\u043b\u0438\u044f, \u0435\u0441\u043b\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b&quot;                                ..... \u0438 \u0435\u0449\u0435 \u043a\u0443\u0447\u0430 \u0432\u0441\u0435\u0433\u043e                                }                   },{},{}     ],     &quot;places&quot;:[\u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u043f\u043e \u043c\u0435\u0441\u0442\u0443 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f],     &quot;hashtags&quot;:[\u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u0441 \u0445\u0435\u0448\u0442\u0430\u0433\u0435\u043c\u0438],     &quot;has_more&quot;: true,     &quot;rank_token&quot;: &quot;0.44093530619864296&quot;,     &quot;clear_client_cache&quot;: false,     &quot;status: &quot;ok&quot; } <\/code><\/pre>\n<p>  <\/p>\n<h2>\u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0432 direct<\/h2>\n<p>  \u0414\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0432 \u0434\u0438\u0440\u0435\u043a\u0442 \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u044e\u0442\u0441\u044f id \u044e\u0437\u0435\u0440\u043e\u0432 \u043a\u043e\u043c\u0443 \u0431\u0443\u0434\u0435\u043c \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c, \u043a\u0430\u043a \u043d\u0430\u0439\u0442\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u044f \u043e\u043f\u0438\u0441\u0430\u043b \u0432\u044b\u0448\u0435.<\/p>\n<pre><code class=\"php\">\/** \u041e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c POST \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 api instagram **\/ POST        https:\/\/i.instagram.com\/api\/v1\/direct_v2\/threads\/broadcast\/text\/ HEADER       \/** \u044e\u0437\u0435\u0440 \u0430\u0433\u0435\u043d\u0442 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 **\/       user-agent: Instagram 10.2.2 Android (18\/4.3; 320dpi; 720x1280; Huawei; HWEVA; EVA-L18; qcom; en_US)      x-csrftoken: \/** \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u0440\u0430\u043d\u0435\u0435 \u043a\u0443\u043a\u0438\u0441 csrftoken **\/      x-ig-app-id: 1217981644879628      cookie: \/** \u0412\u0441\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u043a\u0443\u043a\u0438 \u0440\u0430\u043d\u0435\u0435 **\/      content-type: application\/x-www-form-urlencoded BODY      text={\u0442\u0435\u043a\u0441\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f}&_uuid=&_csrftoken={\u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u0440\u0430\u043d\u0435\u0435 \u043a\u0443\u043a\u0438\u0441 csrftoken}&recipient_users=&quot;[[\u0438\u0434 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0435\u0442\u0435\u043b\u0435\u0439 \u0447\u0435\u0440\u0435\u0437 \u0437\u0430\u043f\u044f\u0442\u0443\u044e]]&quot;&action=send_item&thread_ids=[&quot;0&quot;]&client_context={UUID v4 \u0431\u0435\u0437 \u0434\u0435\u0444\u0438\u0441\u0430} \/** \u0423\u0441\u043f\u0435\u0448\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442 \u041e\u0442\u0432\u0435\u0442 \u043e\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 **\/ {&quot;status&quot;:&quot;ok&quot;, &quot;payload&quot;:{&quot;item_id&quot;:&quot;\u043d\u043e\u043c\u0435\u0440 \u0447\u0430\u0442\u0430&quot;} ...}  \/** \u043f\u0440\u0438\u043c\u0435\u0440 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 UUID v4 **\/ function uuid4()     {         if (function_exists('com_create_guid') === true) {             return trim(com_create_guid(), '{}');         }         $data = openssl_random_pseudo_bytes(16);         $data[6] = chr(ord($data[6]) & 0x0f | 0x40);         $data[8] = chr(ord($data[8]) & 0x3f | 0x80);         return vsprintf('%s%s%s%s%s%s%s%s', str_split(bin2hex($data), 4));     } <\/code><\/pre>\n<p>  <\/p>\n<h2>\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0439 \u0447\u0435\u0440\u0435\u0437 WEB \u0432\u0435\u0440\u0441\u0438\u044e<\/h2>\n<p>  \u041f\u0435\u0440\u0435\u0434 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u043e\u0439 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u043d\u0443\u0436\u043d\u043e \u0438\u0445 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432 ImageJPEG \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e 100 \u0438\u043d\u0430\u0447\u0435 \u0438\u043d\u0441\u0442\u0430\u0433\u0440\u0430\u043c \u0432\u0435\u0440\u043d\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0443:<\/p>\n<pre><code class=\"php\">$photo = __DIR__ . '\/source.jpg'; $file_temp = __DIR__ . '\/send_images.jpg'; list($width, $height, $image_type) = getimagesize(realpath($photo)); $srcImage = ImageCreateFromJPEG($photo); $resImage = ImageCreateTrueColor($width, $height); ImageCopyResampled($resImage, $srcImage, 0, 0, 0, 0, $width, $height, $width, $height); ImageJPEG($srcImage, $file_temp, 100); ImageDestroy($srcImage); <\/code><\/pre>\n<p>  \u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0444\u043e\u0442\u043e:<\/p>\n<pre><code class=\"php\">\/** \u0414\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c POST \u0437\u0430\u043f\u0440\u043e\u0441 **\/ \/** $microtime \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0432\u0440\u0435\u043c\u044f \u0432 microtime \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0448 id photo **\/ $microtime = round(microtime(true) * 1000); POST       https:\/\/www.instagram.com\/rupload_igphoto\/fb_uploader_' . $microtime HEADER       content-type: image\/jpg       x-entity-name: 'fb_uploader_' . $microtime \/** id photo **\/       offset: 0       user-agent: Mozilla\/5.0 (iPhone; CPU iPhone OS 11_4_1 like Mac OS X; ru-RU) AppleWebKit\/537.36 (KHTML, like Gecko)  Version\/11.4.1 Mobile\/15G77 Safari\/537.36 Puffin\/5.2.2IP       x-entity-length: filesize($file_temp) \/** \u0420\u0430\u0437\u043c\u0435\u0440 \u0444\u043e\u0442\u043e **\/       x-instagram-rupload-params: {&quot;media_type&quot;:1,&quot;upload_id&quot;:&quot;' . $microtime . '&quot;,&quot;upload_media_height&quot;:' . $height . ',&quot;upload_media_width&quot;:' . $width . '}      x-csrftoken: \/** \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u0440\u0430\u043d\u0435\u0435 \u043a\u0443\u043a\u0438\u0441 csrftoken **\/      x-ig-app-id: 1217981644879628      cookie: \/** \u0412\u0441\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u043a\u0443\u043a\u0438 \u0440\u0430\u043d\u0435\u0435 **\/ BODY      \/** \u0411\u0435\u0437 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u0432 body  \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0444\u043e\u0442\u043e **\/      file_get_contents(realpath($file_temp)) \/** \u0423\u0441\u043f\u0435\u0448\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442 \u043e\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 json **\/ {&quot;upload_id&quot;:&quot;\u043d\u0430\u0448 \u0438\u0434 \u0444\u043e\u0442\u043e $microtime&quot;, &quot;status&quot;:&quot;ok&quot; ...}   \/** \u041d\u0430 \u044d\u0442\u043e\u043c \u0435\u0449\u0435 \u043d\u0435 \u0432\u0441\u0435, \u043c\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043b\u0438 \u0444\u043e\u0442\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u0435\u0433\u043e \u043d\u0430\u0434\u043e \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c: **\/   POST        https:\/\/www.instagram.com\/create\/configure\/ HEADER       content-type: application\/x-www-form-urlencoded       user-agent: Mozilla\/5.0 (iPhone; CPU iPhone OS 11_4_1 like Mac OS X; ru-RU) AppleWebKit\/537.36 (KHTML, like Gecko)  Version\/11.4.1 Mobile\/15G77 Safari\/537.36 Puffin\/5.2.2IP       x-csrftoken: \/** \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u0440\u0430\u043d\u0435\u0435 \u043a\u0443\u043a\u0438\u0441 csrftoken **\/       x-ig-app-id: 1217981644879628       cookie: \/** \u0412\u0441\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u043a\u0443\u043a\u0438 \u0440\u0430\u043d\u0435\u0435 **\/ BODY       upload_id=$microtime&caption={\u0442\u0435\u043a\u0441\u0442, \u0445\u0435\u0448\u0442\u0435\u0433\u0438}&usertags=&custom_accessibility_caption=&retry_timeout= \/** \u0423\u0441\u043f\u0435\u0448\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442 \u043e\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0432 json \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c *\/ {&quot;status&quot;:&quot;ok&quot;, &quot;media&quot;:{&quot;id&quot;:&quot;***&quot;, ...}}  <\/code><\/pre>\n<p>  \u041d\u0430 \u044d\u0442\u043e\u043c \u0432\u0441\u0435, \u044f \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u0443\u044e \u043e\u0431\u0435\u0440\u0442\u043a\u0443 \u043d\u0430\u0434 instagram.  <\/p>\n<blockquote><p>\u041f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0440\u0430\u0431\u043e\u0447\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u044f \u0432\u044b\u043b\u043e\u0436\u0438\u043b \u043d\u0430 <a href=\"https:\/\/github.com\/tioffs\/InstaLite\">github<\/a>.<\/p><\/blockquote>\n<p><i>\u0411\u0443\u0434\u0443 \u0440\u0430\u0434 \u0443\u0441\u043b\u044b\u0448\u0430\u0442\u044c \u043f\u0440\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0447\u0442\u043e \u0442\u043e \u044f \u043d\u0435 \u0442\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u043b.<\/i><\/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=\"https:\/\/habr.com\/ru\/post\/486714\/\"> https:\/\/habr.com\/ru\/post\/486714\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/486714\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/1s\/vf\/ci\/1svfciotfmi1cn3nyrdc5_leypq.jpeg\" alt=\"image\"\/><\/p>\n<p>  \u0412\u0441\u0435 \u043d\u0430\u0447\u0430\u043b\u043e\u0441\u044c \u0441 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u044f \u0437\u0430\u0445\u043e\u0442\u0435\u043b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043a\u0430\u043d\u0430\u043b \u0432 \u0438\u043d\u0441\u0442\u0430\u0433\u0440\u0430\u043c\u0435 \u043f\u043e\u0442\u0440\u0430\u0442\u0438\u0432 \u043d\u0430 \u043f\u043e\u0438\u0441\u043a\u0438 \u0438 \u0442\u0435\u0441\u0442\u044b \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0430\u0432\u0442\u043e \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0439 \u0446\u0435\u043b\u044b\u0439 \u0434\u0435\u043d\u044c, \u0434\u0430\u043b\u0435\u0435 \u044f \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u043f\u0430\u043a\u0435\u0442\u044b \u0433\u0438\u0442\u0445\u0430\u0431\u0430 \u044f \u0443\u0434\u0438\u0432\u0438\u043b\u0441\u044f \u043d\u0430 \u0440\u0430\u0437\u043c\u0435\u0440 \u043a\u043e\u0434\u0430 \u044d\u0442\u0438\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 (\u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0438 php \u043c\u0435\u043d\u044c\u0448\u0435 \u0447\u0435\u043c \u044d\u0442\u0438 \u043e\u0431\u0435\u0440\u0442\u043a\u0438 \u043d\u0430\u0434 \u0438\u043d\u0441\u0442\u0430\u0433\u0440\u0430\u043c\u043e\u043c), \u044f \u043f\u043b\u044e\u043d\u0443\u043b \u0438 \u0440\u0435\u0448\u0438\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u044e \u043e\u0431\u0435\u0440\u0442\u043a\u0443 \u0441 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c\u0438.  <\/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-298109","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/298109","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=298109"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/298109\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=298109"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=298109"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=298109"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}