{"id":274197,"date":"2016-02-12T19:45:03","date_gmt":"2016-02-12T16:45:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=274197"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=274197","title":{"rendered":"\u0414\u0435\u043b\u0430\u0435\u043c \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0435 \u043f\u0440\u0435\u0432\u044c\u044e\u0448\u043a\u0438 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u0430"},"content":{"rendered":"<p>       \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u044f \u0445\u043e\u0442\u0435\u043b \u0431\u044b \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043e \u0441\u0432\u043e\u0435\u043c \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434\u0435. \u0415\u0441\u043b\u0438 \u0442\u044b \u2014 \u0432\u0435\u0431-\u0434\u0438\u0437\u0430\u0439\u043d\u0435\u0440, \u0442\u044b \u0437\u043d\u0430\u0435\u0448\u044c \u043e \u0442\u0430\u043a\u043e\u0439 \u0448\u0442\u0443\u043a\u0435 \u043a\u0430\u043a <u>meta property=&#187;og: image&#187;<\/u>. \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043a\u0430\u043a \u044f \u0441\u0434\u0435\u043b\u0430\u043b \u0442\u0430\u043a\u0443\u044e \u043f\u0440\u0435\u0432\u044c\u044e\u0448\u043a\u0443 \u0434\u043b\u044f \u0441\u0432\u043e\u0435\u0433\u043e \u0441\u0430\u0439\u0442\u0430.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/882\/15b\/b04\/88215bb0401f4a5988ad9991c1f7b61e.PNG\"\/><br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h2><font color=\"#047DFC\">\u0428\u0430\u0433 \u043f\u0435\u0440\u0432\u044b\u0439<\/font> \u2014 placeholder.php<\/h2>\n<p>  <\/p>\n<pre><code class=\"php\">&lt;?php error_reporting(0);   function gettitle($param){ \treturn $title; \/\/\u0417\u0434\u0435\u0441\u044c \u043d\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e } function getdes($param){ \treturn $description;\/\/\u0417\u0434\u0435\u0441\u044c \u0442\u043e\u0436\u0435 }  $param = $_GET['p'];\/\/param - \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b $param = urldecode($param); $param = base64_decode($param);\/\/\u043e\u043d \u0443 \u043d\u0430\u0441 \u0447\u0435\u0440\u0435\u0437 base64  $im = imagecreatetruecolor(800, 400);  $textsize = 40; $font = dirname(__FILE__).'\/..\/fonts\/1.TTF';  $color[0] = ImageColorAllocate($im,250, 250,  250);\/\/\u0426\u0432\u0435\u0442\u0430 $color[1] = ImageColorAllocate($im,158, 158,  158); $color[2] = ImageColorAllocate($im,4, 125,  252); $color[3] = ImageColorAllocate($im,0, 65,  132);  imagefilledrectangle($im,0,0,800,800,$color[1]); imagefilledrectangle($im,0,0,800,120,$color[2]); Imagettftext($im, 80, 0, 32, 100, $color[0], $font, 'Blast.ORQ'); imagefilledrectangle($im,0,120,800,130,$color[3]);  if(gettitle($param)){ \t$txt = gettitle($param); }else{ \t$txt = 'Error 404: Not found'; } Imagettftext($im, 48, 0, 24, 200, $color[0], $font, $txt);  if(getdes($param)){ \t$str = getdes($param); \t$str = str_replace([&quot;\\r&quot;,&quot;\\n&quot;],&quot;\\r\\n&quot;, $str); \t$str = wordwrap($str, 75, &quot;\\r\\n&quot;); \t$pieces = explode(&quot;\\r\\n&quot;, $str); \t$s = 248; \tforeach ($pieces as $a){ \t\tif($a){ \t\t\tImagettftext($im, 24, 0, 24, $s, $color[0], $font, $a); \t\t\t$s += 45;\/\/\u0418\u043d\u0442\u0435\u0440\u0432\u0430\u043b \t\t} \t} }else{ \tImagettftext($im, 24, 0, 24, 248, $color[0], $font, 'Page, image or file was not found :('); }  Header ('Content-type: image\/png'); imagepng($im); imagedestroy($im); ?&gt; <\/code><\/pre>\n<p>  \u0426\u0432\u0435\u0442\u0430:<\/p>\n<p>  |<font color=\"#fafafa\">\u2589rgb(250, 250, 250)<\/font>|<br \/>  |<font color=\"#9E9E9E\">\u2589rgb(158, 158, 158)<\/font>|<br \/>  |<font color=\"#047DFC\">\u2589rgb(4, 125, 252)<\/font>|<br \/>  |<font color=\"#004184\">\u2589rgb(0, 65, 132)<\/font>|<\/p>\n<h2><font color=\"#047DFC\">\u0428\u0430\u0433 \u0432\u0442\u043e\u0440\u043e\u0439<\/font> \u2014 \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u0430 \u0441\u0430\u0439\u0442<\/h2>\n<p>  <\/p>\n<pre><code class=\"php\">&lt;meta property=&quot;og: image&quot; content=&quot;http:\/\/\u2589\u2589\u2589\u2589\u2589\/placeholder.png?p=&lt;?=urlencode(base64_encode($param));?&gt;&quot;\/&gt; &lt;meta property=&quot;og:image&quot; content=&quot;http:\/\/\u2589\u2589\u2589\u2589\u2589\/placeholder.png?p=&lt;?=urlencode(base64_encode($param));?&gt;&quot;\/&gt; <\/code><\/pre>\n<p>  \u0417\u0434\u0435\u0441\u044c \u0432\u0441\u0435 \u0442\u0430\u043a \u043f\u0440\u043e\u0441\u0442\u043e \u0447\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u0442\u044b\u0434\u043d\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0442\u044c. $param \u2014 \u043e\u043d \u0431\u044b\u043b \u0432 \u0441\u043a\u0440\u0438\u043f\u0442\u0435, \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b.<\/p>\n<p>  \u0412\u0441\u0435, \u0442\u0435\u043f\u0435\u0440\u044c \u0434\u0435\u043b\u0438\u043c\u0441\u044f \u0441\u0430\u0439\u0442\u043e\u043c.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/b29\/98a\/44d\/b2998a44dd2f4e73a0686d23898fa199.PNG\"\/><\/p>\n<p>  \u0418 \u0440\u0430\u0434\u0443\u0435\u043c\u0441\u044f!<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/882\/15b\/b04\/88215bb0401f4a5988ad9991c1f7b61e.PNG\"\/><\/p>\n<h2><font color=\"#047DFC\">\u0411\u043e\u043d\u0443\u0441!<\/font><\/h2>\n<p>  \u0412\u043e\u0442 \u0442\u0430\u043a\u0430\u044f \u043f\u0440\u0435\u0432\u044c\u044e\u0448\u043a\u0430:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/148\/607\/4bf\/1486074bffa140d4b816fb7ac555c195.PNG\"\/><\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"php\">&lt;?php function gettitle($param){ \treturn $title; \/\/\u0417\u0434\u0435\u0441\u044c \u043d\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e } function getdes($param){ \treturn $description;\/\/\u0417\u0434\u0435\u0441\u044c \u0442\u043e\u0436\u0435 }      $param = $_GET['p'];     $param = urldecode($param);     $param = base64_decode($param);     $param = mb_convert_case($param, MB_CASE_LOWER, &quot;UTF-8&quot;);          $ttl = gettitle($param);     $des = getdes($param);          $font          = dirname(__FILE__) . '\/fonts\/10.TTF';     $bigtextsize   = 35;     $smalltextsize = 25;     $tilt          = 0;     $width         = 600;     $height        = 500;     $im            = imagecreatetruecolor($width, $height);          imagecopy($im, imagecreatefromjpeg(dirname(__FILE__) . '\/backgrounds\/' . rand(1, 12) . '.jpg'), 0, 0, rand(0, 400), rand(0, 400), $width, $height);          $gaussian = array(         array(             1.0,             2.0,             1.0         ),         array(             2.0,             4.0,             2.0         ),         array(             1.0,             2.0,             1.0         )     );     imageconvolution($im, $gaussian, 20, 25);     imageconvolution($im, $gaussian, 20, 25);     imageconvolution($im, $gaussian, 20, 25);     imagefilter($im, IMG_FILTER_GAUSSIAN_BLUR);     imagefilter($im, IMG_FILTER_SELECTIVE_BLUR);          $color = ImageColorAllocatealpha($im, 255, 255, 255, 80);          $X = $width \/ 2 - strlen($ttl) * (($bigtextsize * 0.5)) \/ 2;     $Y = $bigtextsize * 1.5;     Imagettftext($im, $bigtextsize, $tilt, $X, $Y, $color, $font, $ttl);          if (strlen($des) &lt; 35) {\/\/\u0415\u0441\u043b\u0438 \u0442\u0435\u043a\u0441\u0442 \u0431\u043e\u043b\u044c\u0448\u043e\u0439         $X   = $width \/ 2 - 35 * (($smalltextsize * 0.5)) \/ 2;         $des = wordwrap($des, 35, &quot;\\r\\n&quot;, true);\/\/\u0414\u0435\u043b\u0438\u043c \u043d\u0430 \u0447\u0430\u0441\u0442\u0438     } else {         $X = $width \/ 2 - strlen($des) * (($smalltextsize * 0.5)) \/ 2;     }     $Y = $smalltextsize * 4;     Imagettftext($im, $smalltextsize, $tilt, $X, $Y, $color, $font, $des);          imagepng($im);     Header('Content-type: image\/png');     imagedestroy($im); ?&gt; <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435!               <\/p>\n<div class=\"clear\"><\/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:\/\/habrahabr.ru\/post\/277151\/\"> https:\/\/habrahabr.ru\/post\/277151\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u044f \u0445\u043e\u0442\u0435\u043b \u0431\u044b \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043e \u0441\u0432\u043e\u0435\u043c \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434\u0435. \u0415\u0441\u043b\u0438 \u0442\u044b \u2014 \u0432\u0435\u0431-\u0434\u0438\u0437\u0430\u0439\u043d\u0435\u0440, \u0442\u044b \u0437\u043d\u0430\u0435\u0448\u044c \u043e \u0442\u0430\u043a\u043e\u0439 \u0448\u0442\u0443\u043a\u0435 \u043a\u0430\u043a <u>meta property=&#187;og: image&#187;<\/u>. \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043a\u0430\u043a \u044f \u0441\u0434\u0435\u043b\u0430\u043b \u0442\u0430\u043a\u0443\u044e \u043f\u0440\u0435\u0432\u044c\u044e\u0448\u043a\u0443 \u0434\u043b\u044f \u0441\u0432\u043e\u0435\u0433\u043e \u0441\u0430\u0439\u0442\u0430.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/882\/15b\/b04\/88215bb0401f4a5988ad9991c1f7b61e.PNG\"\/>  <\/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-274197","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/274197","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=274197"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/274197\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=274197"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=274197"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=274197"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}