{"id":330092,"date":"2022-02-25T03:00:10","date_gmt":"2022-02-25T03:00:10","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=330092"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=330092","title":{"rendered":"<span>\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 PHP \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0432\u0438\u0434\u0435\u043e \u043f\u043e \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u0443<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h2>\u041f\u0440\u043e\u0435\u043a\u0442 Video Color <\/h2>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/76f\/747\/3d2\/76f7473d291832518b34ab35c4a01d64.jpg\" width=\"700\" height=\"1039\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/76f\/747\/3d2\/76f7473d291832518b34ab35c4a01d64.jpg\" data-blurred=\"true\"\/><figcaption><\/figcaption><\/figure>\n<h3>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/h3>\n<p>\u041f\u0435\u0440\u0435\u0434 \u0432\u0441\u0435\u043c\u0438 \u043d\u0430\u043c\u0438 \u0435\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u043e \u0432\u0441\u0442\u0430\u0451\u0442 \u0437\u0430\u0434\u0430\u0447\u0430 \u043f\u043e\u0438\u0441\u043a\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438. \u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043d\u0430\u0439\u0442\u0438 \u0442\u0435\u043a\u0441\u0442, \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u0430\u0443\u0434\u0438\u043e \u0438\u043b\u0438 \u0432\u0438\u0434\u0435\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e. \u0427\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0442\u0435\u043a\u0441\u0442. \u0420\u0435\u0436\u0435 &#8212; \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f. \u0415\u0441\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u0432\u0440\u043e\u0434\u0435 &#171;Shazam&#187;, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0449\u0443\u0442 \u043c\u0443\u0437\u044b\u043a\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0437\u0430\u043f\u0438\u0441\u044c \u0437\u0432\u0443\u043a\u0430. \u041c\u044b \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0438\u043b\u0438\u0441\u044c \u043d\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442 \u043f\u043e\u0438\u0441\u043a \u0432\u0438\u0434\u0435\u043e. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0434\u043b\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f.<\/p>\n<h3>\u0421\u0430\u0439\u0442<\/h3>\n<blockquote>\n<p>\u0421\u0430\u0439\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 <a href=\"https:\/\/www.videocolor.aapsoftware.ru\/\" rel=\"noopener noreferrer nofollow\">www.videocolor.aapsoftware.ru<\/a><\/p>\n<\/blockquote>\n<h3>\u0421\u043f\u0438\u0441\u043e\u043a \u0441\u0442\u0430\u0442\u0435\u0439<\/h3>\n<ul>\n<li>\n<p><a href=\"https:\/\/medium.com\/@grifer163\/%D1%82%D0%B5%D1%85%D0%BD%D0%BE%D0%BB%D0%BE%D0%B3%D0%B8%D1%8F-%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-%D0%BF%D0%BE%D0%B8%D1%81%D0%BA%D0%B0-video-color-8960214cc911\" rel=\"noopener noreferrer nofollow\">\u0422\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f \u0432\u0438\u0434\u0435\u043e \u043f\u043e\u0438\u0441\u043a\u0430 Video Color<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/517048\/\" rel=\"noopener noreferrer nofollow\">\u0422\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f \u0432\u0438\u0434\u0435\u043e \u043f\u043e\u0438\u0441\u043a\u0430 \u00abVideo Color\u00bb (\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f)<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/588899\/\" rel=\"noopener noreferrer nofollow\">\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043f\u043e\u0438\u0441\u043a\u0430 \u043a\u0430\u0434\u0440\u043e\u0432 \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435\u043c \u0441\u0442\u043e\u0440\u043e\u043d \u0438 \u0438\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0435<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/589013\/\" rel=\"noopener noreferrer nofollow\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u043d\u044b\u0445 \u0445\u044d\u0448\u0435\u0439 \u0434\u043b\u044f \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043a\u0430\u0434\u0440\u043e\u0432 \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/589383\/\" rel=\"noopener noreferrer nofollow\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0435\u0440\u0446\u0435\u043f\u0442\u0438\u0432\u043d\u044b\u0445 \u0445\u044d\u0448\u0435\u0439 \u0434\u043b\u044f \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043a\u0430\u0434\u0440\u043e\u0432 \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u00abVideoColor\u00bb<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/596857\/\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u0438\u0441\u043a\u043e\u0432\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u00abVideo Color\u00bb \u0434\u043b\u044f \u043b\u044e\u0431\u0438\u0442\u0435\u043b\u0435\u0439 \u0444\u0438\u043b\u044c\u043c\u043e\u0432<\/a>  <\/p>\n<\/li>\n<\/ul>\n<h3>\u0421\u043f\u0438\u0441\u043e\u043a \u0432\u0438\u0434\u0435\u043e<\/h3>\n<ul>\n<li>\n<p><a href=\"https:\/\/www.youtube.com\/watch?v=cqQOZE49P_g\" rel=\"noopener noreferrer nofollow\">Video Color Creator 3.0 (\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0432\u043e\u0438\u0445 \u0444\u0438\u043b\u044c\u043c\u043e\u0432 \u0432 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 &#171;Video Color&#187;)<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/www.youtube.com\/watch?v=bTmGMrPIVHk\" rel=\"noopener noreferrer nofollow\">\u0418\u0449\u0435\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0444\u0438\u043b\u044c\u043c\u0430 \u043f\u043e \u043a\u0430\u0434\u0440\u0443<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/www.youtube.com\/watch?v=z0p3AxGNJhk\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u0438\u0441\u043a \u0432\u0438\u0434\u0435\u043e \u043f\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044e \u0438 \u043f\u043e\u0438\u0441\u043a \u0432\u0438\u0434\u0435\u043e \u043f\u043e \u043a\u043e\u0440\u043e\u0442\u043a\u043e\u043c\u0443 \u0432\u0438\u0434\u0435\u043e \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0443<\/a><\/p>\n<\/li>\n<\/ul>\n<h2>\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430<\/h2>\n<p>\u0414\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0432\u0438\u0434\u0435\u043e \u043f\u043e \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u0443 \u0434\u043b\u044f \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0445 \u0432\u0435\u0431-\u0441\u0430\u0439\u0442\u043e\u0432 \u043d\u0430 PHP \u0431\u044b\u043b\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 Video Color Search Client.<\/p>\n<p>\u0415\u0441\u0442\u044c \u0434\u0432\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438:<\/p>\n<ul>\n<li>\n<p>GitHub<\/p>\n<\/li>\n<li>\n<p>Packagist.org<\/p>\n<\/li>\n<\/ul>\n<h3> GitHub<\/h3>\n<p>\u0414\u043b\u044f \u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0441 GitHub \u043e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u043e\u043a\u043e\u0448\u043a\u043e \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0430, \u043f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<p><strong><em>git clone https:\/\/github.com\/alekseev23\/VideoColorSearchClientPHP.git<\/em><\/strong><\/p>\n<h3>Packagist.org<\/h3>\n<p>\u0414\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043f\u0430\u043a\u0435\u0442\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <strong>Composer<\/strong> \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<p><strong><em>php composer.phar require aap_software\/video_color_search_client<\/em><\/strong><\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0435\u0451 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 <strong>vendor<\/strong>  \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u043f\u043e\u0434\u043a\u0430\u0442\u0430\u043b\u043e\u0433 <strong>aap_software<\/strong>.<\/p>\n<h2>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438  <\/h2>\n<h3>\u0422\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442<\/h3>\n<ul>\n<li>\n<p>\u041e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u043e\u043a\u043e\u0448\u043a\u043e \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0430<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0442\u0443\u0434\u0430 \u0433\u0434\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0444\u0430\u0439\u043b <strong>sample.php<\/strong><\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443<\/p>\n<\/li>\n<\/ul>\n<p> <strong><em>php sample.php test.jpg<\/em><\/strong><\/p>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0444\u0438\u043b\u044c\u043c\u0435. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442. \u0413\u0434\u0435 \u0435\u0433\u043e \u0432\u0437\u044f\u0442\u044c? \u0412 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435 \u043f\u043e\u043b\u043d\u043e \u043a\u0430\u0434\u0440\u043e\u0432 \u0438\u0437 \u0444\u0438\u043b\u044c\u043c\u043e\u0432.<\/p>\n<h3>\u041a\u043e\u0434 \u043f\u0440\u0438\u043c\u0435\u0440\u0430<\/h3>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u0448\u0435\u043c \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 <strong>example.php<\/strong> \u0438 \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c \u0435\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u0443.<\/p>\n<pre><code class=\"php\">&lt;?php declare(strict_types=1); require(\"vendor\/autoload.php\"); $img = imagecreatefromjpeg(\"test.jpg\"); $search = new AapSoftware\\VideoColor\\SearchClient(); $obj = $search->get($img); imagedestroy($img); if ($obj === null) {     echo \"Server not connected!\\n\"; } elseif (!$obj->result) {     echo \"Not found\\n\"; } else {     var_dump($obj); }<\/code><\/pre>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c, \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 <strong>test.jpg<\/strong> \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0435\u0433\u043e:<\/p>\n<p><strong><em>php example.php<\/em><\/strong><\/p>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0443\u0432\u0438\u0434\u0438\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/905\/afb\/60e\/905afb60e1f849ca161efc8ffa656c60.jpg\" width=\"979\" height=\"512\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/905\/afb\/60e\/905afb60e1f849ca161efc8ffa656c60.jpg\" data-blurred=\"true\"\/><figcaption><\/figcaption><\/figure>\n<h3>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0439 \u0440\u0430\u0437\u0431\u043e\u0440 \u043a\u043e\u0434\u0430<\/h3>\n<p>\u0412\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0440\u0435\u0436\u0438\u043c \u0441\u0442\u0440\u043e\u0433\u043e\u0439 \u0442\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<pre><code class=\"php\">&lt;?php declare(strict_types=1);<\/code><\/pre>\n<p> \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043d\u0430\u0448\u0443 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443  <\/p>\n<pre><code class=\"php\">require(\"vendor\/autoload.php\");<\/code><\/pre>\n<p> \u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0438\u0437 <strong>JPEG<\/strong> \u0444\u0430\u0439\u043b\u0430 <strong>test.jpg<\/strong><\/p>\n<pre><code class=\"php\">$img = imagecreatefromjpeg(\"test.jpg\");<\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043a\u043b\u0430\u0441\u0441\u0430 <strong>SearchClient<\/strong>.<\/p>\n<pre><code class=\"php\">$search = new AapSoftware\\VideoColor\\SearchClient();<\/code><\/pre>\n<p> \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432 \u043d\u0430\u0448\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435.<\/p>\n<pre><code class=\"php\">$obj = $search->get($img);<\/code><\/pre>\n<p> \u0423\u0434\u0430\u043b\u044f\u0435\u043c \u0441\u0442\u0430\u0432\u0448\u0435\u0435 \u043d\u0435\u043d\u0443\u0436\u043d\u044b\u043c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435.<\/p>\n<pre><code class=\"php\">imagedestroy($img);<\/code><\/pre>\n<p> \u0410\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0438 \u0435\u0441\u043b\u0438 \u043d\u0435\u0442 \u043e\u0448\u0438\u0431\u043e\u043a, \u0442\u043e \u0432\u044b\u0432\u043e\u0434\u0438\u043c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e.<\/p>\n<pre><code class=\"php\">if ($obj === null) {     echo \"Server not connected!\\n\"; } elseif (!$obj->result) {     echo \"Not found\\n\"; } else {     var_dump($obj); }<\/code><\/pre>\n<h4> \u0417\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u0435 1<\/h4>\n<p> \u0415\u0441\u043b\u0438 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0430\u0432\u0442\u043e\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u043a\u043b\u0430\u0441\u0441\u043e\u0432, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0438\u043d\u0430\u0447\u0435.<\/p>\n<pre><code class=\"php\">require(\"src\/SearchClient.php\");<\/code><\/pre>\n<h4>\u0417\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u0435 2<\/h4>\n<p>\u0415\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0432\u0438\u0434\u0435\u043e \u043d\u0435 \u043d\u0430 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u043c (\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u043e-\u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e) \u0430 \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u043c \u044f\u0437\u044b\u043a\u0435, \u0442\u043e \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432\u0442\u043e\u0440\u043e\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440.<\/p>\n<pre><code class=\"php\">$obj = $search->get($img,\"ru\");<\/code><\/pre>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \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\/653371\/\"> https:\/\/habr.com\/ru\/post\/653371\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h2>\u041f\u0440\u043e\u0435\u043a\u0442 Video Color <\/h2>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<h3>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/h3>\n<p>\u041f\u0435\u0440\u0435\u0434 \u0432\u0441\u0435\u043c\u0438 \u043d\u0430\u043c\u0438 \u0435\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u043e \u0432\u0441\u0442\u0430\u0451\u0442 \u0437\u0430\u0434\u0430\u0447\u0430 \u043f\u043e\u0438\u0441\u043a\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438. \u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043d\u0430\u0439\u0442\u0438 \u0442\u0435\u043a\u0441\u0442, \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u0430\u0443\u0434\u0438\u043e \u0438\u043b\u0438 \u0432\u0438\u0434\u0435\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e. \u0427\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0442\u0435\u043a\u0441\u0442. \u0420\u0435\u0436\u0435 &#8212; \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f. \u0415\u0441\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u0432\u0440\u043e\u0434\u0435 &#171;Shazam&#187;, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0449\u0443\u0442 \u043c\u0443\u0437\u044b\u043a\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0437\u0430\u043f\u0438\u0441\u044c \u0437\u0432\u0443\u043a\u0430. \u041c\u044b \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0438\u043b\u0438\u0441\u044c \u043d\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442 \u043f\u043e\u0438\u0441\u043a \u0432\u0438\u0434\u0435\u043e. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0434\u043b\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f.<\/p>\n<h3>\u0421\u0430\u0439\u0442<\/h3>\n<blockquote>\n<p>\u0421\u0430\u0439\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 <a href=\"https:\/\/www.videocolor.aapsoftware.ru\/\" rel=\"noopener noreferrer nofollow\">www.videocolor.aapsoftware.ru<\/a><\/p>\n<\/blockquote>\n<h3>\u0421\u043f\u0438\u0441\u043e\u043a \u0441\u0442\u0430\u0442\u0435\u0439<\/h3>\n<ul>\n<li>\n<p><a href=\"https:\/\/medium.com\/@grifer163\/%D1%82%D0%B5%D1%85%D0%BD%D0%BE%D0%BB%D0%BE%D0%B3%D0%B8%D1%8F-%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-%D0%BF%D0%BE%D0%B8%D1%81%D0%BA%D0%B0-video-color-8960214cc911\" rel=\"noopener noreferrer nofollow\">\u0422\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f \u0432\u0438\u0434\u0435\u043e \u043f\u043e\u0438\u0441\u043a\u0430 Video Color<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/517048\/\" rel=\"noopener noreferrer nofollow\">\u0422\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f \u0432\u0438\u0434\u0435\u043e \u043f\u043e\u0438\u0441\u043a\u0430 \u00abVideo Color\u00bb (\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f)<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/588899\/\" rel=\"noopener noreferrer nofollow\">\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043f\u043e\u0438\u0441\u043a\u0430 \u043a\u0430\u0434\u0440\u043e\u0432 \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435\u043c \u0441\u0442\u043e\u0440\u043e\u043d \u0438 \u0438\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0435<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/589013\/\" rel=\"noopener noreferrer nofollow\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u043d\u044b\u0445 \u0445\u044d\u0448\u0435\u0439 \u0434\u043b\u044f \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043a\u0430\u0434\u0440\u043e\u0432 \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/589383\/\" rel=\"noopener noreferrer nofollow\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0435\u0440\u0446\u0435\u043f\u0442\u0438\u0432\u043d\u044b\u0445 \u0445\u044d\u0448\u0435\u0439 \u0434\u043b\u044f \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043a\u0430\u0434\u0440\u043e\u0432 \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u00abVideoColor\u00bb<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/596857\/\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u0438\u0441\u043a\u043e\u0432\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u00abVideo Color\u00bb \u0434\u043b\u044f \u043b\u044e\u0431\u0438\u0442\u0435\u043b\u0435\u0439 \u0444\u0438\u043b\u044c\u043c\u043e\u0432<\/a>  <\/p>\n<\/li>\n<\/ul>\n<h3>\u0421\u043f\u0438\u0441\u043e\u043a \u0432\u0438\u0434\u0435\u043e<\/h3>\n<ul>\n<li>\n<p><a href=\"https:\/\/www.youtube.com\/watch?v=cqQOZE49P_g\" rel=\"noopener noreferrer nofollow\">Video Color Creator 3.0 (\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0432\u043e\u0438\u0445 \u0444\u0438\u043b\u044c\u043c\u043e\u0432 \u0432 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 &#171;Video Color&#187;)<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/www.youtube.com\/watch?v=bTmGMrPIVHk\" rel=\"noopener noreferrer nofollow\">\u0418\u0449\u0435\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0444\u0438\u043b\u044c\u043c\u0430 \u043f\u043e \u043a\u0430\u0434\u0440\u0443<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/www.youtube.com\/watch?v=z0p3AxGNJhk\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u0438\u0441\u043a \u0432\u0438\u0434\u0435\u043e \u043f\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044e \u0438 \u043f\u043e\u0438\u0441\u043a \u0432\u0438\u0434\u0435\u043e \u043f\u043e \u043a\u043e\u0440\u043e\u0442\u043a\u043e\u043c\u0443 \u0432\u0438\u0434\u0435\u043e \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0443<\/a><\/p>\n<\/li>\n<\/ul>\n<h2>\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430<\/h2>\n<p>\u0414\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0432\u0438\u0434\u0435\u043e \u043f\u043e \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u0443 \u0434\u043b\u044f \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0445 \u0432\u0435\u0431-\u0441\u0430\u0439\u0442\u043e\u0432 \u043d\u0430 PHP \u0431\u044b\u043b\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 Video Color Search Client.<\/p>\n<p>\u0415\u0441\u0442\u044c \u0434\u0432\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438:<\/p>\n<ul>\n<li>\n<p>GitHub<\/p>\n<\/li>\n<li>\n<p>Packagist.org<\/p>\n<\/li>\n<\/ul>\n<h3> GitHub<\/h3>\n<p>\u0414\u043b\u044f \u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0441 GitHub \u043e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u043e\u043a\u043e\u0448\u043a\u043e \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0430, \u043f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<p><strong><em>git clone https:\/\/github.com\/alekseev23\/VideoColorSearchClientPHP.git<\/em><\/strong><\/p>\n<h3>Packagist.org<\/h3>\n<p>\u0414\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043f\u0430\u043a\u0435\u0442\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <strong>Composer<\/strong> \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<p><strong><em>php composer.phar require aap_software\/video_color_search_client<\/em><\/strong><\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0435\u0451 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 <strong>vendor<\/strong>  \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u043f\u043e\u0434\u043a\u0430\u0442\u0430\u043b\u043e\u0433 <strong>aap_software<\/strong>.<\/p>\n<h2>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438  <\/h2>\n<h3>\u0422\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442<\/h3>\n<ul>\n<li>\n<p>\u041e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u043e\u043a\u043e\u0448\u043a\u043e \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0430<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0442\u0443\u0434\u0430 \u0433\u0434\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0444\u0430\u0439\u043b <strong>sample.php<\/strong><\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443<\/p>\n<\/li>\n<\/ul>\n<p> <strong><em>php sample.php test.jpg<\/em><\/strong><\/p>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0444\u0438\u043b\u044c\u043c\u0435. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442. \u0413\u0434\u0435 \u0435\u0433\u043e \u0432\u0437\u044f\u0442\u044c? \u0412 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435 \u043f\u043e\u043b\u043d\u043e \u043a\u0430\u0434\u0440\u043e\u0432 \u0438\u0437 \u0444\u0438\u043b\u044c\u043c\u043e\u0432.<\/p>\n<h3>\u041a\u043e\u0434 \u043f\u0440\u0438\u043c\u0435\u0440\u0430<\/h3>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u0448\u0435\u043c \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 <strong>example.php<\/strong> \u0438 \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c \u0435\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u0443.<\/p>\n<pre><code class=\"php\">&lt;?php declare(strict_types=1); require(\"vendor\/autoload.php\"); $img = imagecreatefromjpeg(\"test.jpg\"); $search = new AapSoftware\\VideoColor\\SearchClient(); $obj = $search->get($img); imagedestroy($img); if ($obj === null) {     echo \"Server not connected!\\n\"; } elseif (!$obj->result) {     echo \"Not found\\n\"; } else {     var_dump($obj); }<\/code><\/pre>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c, \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 <strong>test.jpg<\/strong> \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0435\u0433\u043e:<\/p>\n<p><strong><em>php example.php<\/em><\/strong><\/p>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0443\u0432\u0438\u0434\u0438\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<h3>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0439 \u0440\u0430\u0437\u0431\u043e\u0440 \u043a\u043e\u0434\u0430<\/h3>\n<p>\u0412\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0440\u0435\u0436\u0438\u043c \u0441\u0442\u0440\u043e\u0433\u043e\u0439 \u0442\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<pre><code class=\"php\">&lt;?php declare(strict_types=1);<\/code><\/pre>\n<p> \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043d\u0430\u0448\u0443 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443  <\/p>\n<pre><code class=\"php\">require(\"vendor\/autoload.php\");<\/code><\/pre>\n<p> \u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0438\u0437 <strong>JPEG<\/strong> \u0444\u0430\u0439\u043b\u0430 <strong>test.jpg<\/strong><\/p>\n<pre><code class=\"php\">$img = imagecreatefromjpeg(\"test.jpg\");<\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043a\u043b\u0430\u0441\u0441\u0430 <strong>SearchClient<\/strong>.<\/p>\n<pre><code class=\"php\">$search = new AapSoftware\\VideoColor\\SearchClient();<\/code><\/pre>\n<p> \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432 \u043d\u0430\u0448\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435.<\/p>\n<pre><code class=\"php\">$obj = $search->get($img);<\/code><\/pre>\n<p> \u0423\u0434\u0430\u043b\u044f\u0435\u043c \u0441\u0442\u0430\u0432\u0448\u0435\u0435 \u043d\u0435\u043d\u0443\u0436\u043d\u044b\u043c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435.<\/p>\n<pre><code class=\"php\">imagedestroy($img);<\/code><\/pre>\n<p> \u0410\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0438 \u0435\u0441\u043b\u0438 \u043d\u0435\u0442 \u043e\u0448\u0438\u0431\u043e\u043a, \u0442\u043e \u0432\u044b\u0432\u043e\u0434\u0438\u043c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e.<\/p>\n<pre><code class=\"php\">if ($obj === null) {     echo \"Server not connected!\\n\"; } elseif (!$obj->result) {     echo \"Not found\\n\"; } else {     var_dump($obj); }<\/code><\/pre>\n<h4> \u0417\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u0435 1<\/h4>\n<p> \u0415\u0441\u043b\u0438 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0430\u0432\u0442\u043e\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u043a\u043b\u0430\u0441\u0441\u043e\u0432, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0438\u043d\u0430\u0447\u0435.<\/p>\n<pre><code class=\"php\">require(\"src\/SearchClient.php\");<\/code><\/pre>\n<h4>\u0417\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u0435 2<\/h4>\n<p>\u0415\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0432\u0438\u0434\u0435\u043e \u043d\u0435 \u043d\u0430 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u043c (\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u043e-\u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e) \u0430 \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u043c \u044f\u0437\u044b\u043a\u0435, \u0442\u043e \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432\u0442\u043e\u0440\u043e\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440.<\/p>\n<pre><code class=\"php\">$obj = $search->get($img,\"ru\");<\/code><\/pre>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \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\/653371\/\"> https:\/\/habr.com\/ru\/post\/653371\/<\/a><br \/><\/br><\/br><\/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-330092","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/330092","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=330092"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/330092\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=330092"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=330092"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=330092"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}