Тег TITLE

Извлечение данных с помощью регулярных выражений PHP

Получение данных с помощью функций preg_match() и preg_match_all() .

Текст из скобок

Извлечение содержимого из круглых, квадратных и фигурных скобок:

$text = ' Телеобъектив: диафрагма [ƒ/2.8] Широкоугольный объектив: (диафрагма ƒ/1.8) По беспроводной сети: Поддержка диапазона: '; /* [. ] */ preg_match_all("/\[(.+?)\]/", $text, $matches); print_r($matches[1]); /* (. ) */ preg_match_all("/\((.+?)\)/", $text, $matches); print_r($matches[1]); /* */ preg_match_all("/\<(.+?)\>/", $text, $matches); print_r($matches[1]); /* */ preg_match_all("/\<(.+?)\>/", $text, $matches); print_r($matches[1]);

Результат:

Array ( [0] => ƒ/2.8 ) Array ( [0] => диафрагма ƒ/1.8 ) Array ( [0] => до 13 часов ) Array ( [0] => Dolby Vision и HDR10 )

Текст из HTML тегов

$text = '  

Тег H1

Текст 1

Текст 2

'; /* */ preg_match('/<title[^>]*?>(.*?)/si', $text, $matches); echo $matches[1]; /* <h2>*/ preg_match('/<h1[^>]*?>(.*?)/si', $text, $matches); echo $matches[1]; /* Извлекает текст из всех <p>*/ preg_match_all('/<p[^>]*?>(.*?)/si', $text, $matches); print_r($matches[1]);</code></pre> <h4 id="rezultat-2">Результат:</h4> <pre><code >Тег TITLE Тег H1 Array ( [0] => Текст 1 [1] => Текст 2 )</code></pre> <h2 id="url-iz-teksta"> URL из текста </h2> <pre><code >$text = 'Text http://ya.ru text http://google.ru text.'; preg_match_all('/(http:\/\/|https:\/\/)?(www)?([\da-z\.-]+)\.([a-z\.])([\/\w\.-\?\%\&]*)*\/?/i', $text, $matches); print_r($matches[0]);</code></pre> <h4 id="rezultat-3">Результат:</h4> <pre><code >Array ( [0] => http://ya.ru [1] => http://google.ru )</code></pre> <h2 id="href-iz-ssylok"> href из ссылок </h2> <pre><code >$text = ' Яндекс Google Mail.ru '; preg_match_all('//i', $text, $matches); print_r($matches[1]);</code></pre> <h4 id="rezultat-4">Результат:</h4> <pre><code >Array ( [0] => http://ya.ru [1] => http://google.ru [2] => http://mail.ru )</code></pre> <h2 id="ankory-ssylok"> Анкоры ссылок </h2> <pre><code >$text = ' Яндекс Google Mail.ru '; preg_match_all('/(.*?)/i', $text, $matches); print_r($matches[1]);</code></pre> <h4 id="rezultat-5">Результат:</h4> <pre><code >Array ( [0] => Яндекс [1] => Google [2] => Mail.ru )</code></pre> <h2 id="src-iz-tegov-img"> Src из тегов img </h2> <pre><code >$text = 'text text'; preg_match_all('//is', $text, $matches); print_r($matches[1]);</code></pre> <h4 id="rezultat-6">Результат:</h4> <h2 id="e-mail-adresa-iz-teksta"> E-mail адреса из текста </h2> <pre><code >$text = 'text admin@mail.ru text text text admin@ya.ru'; preg_match_all('/([a-z0-9_\-]+\.)*[a-z0-9_\-]+@([a-z0-9][a-z0-9\-]*[a-z0-9]\.)+[a-z]/i', $text, $matches); print_r($matches[0]);</code></pre> <h4 id="rezultat-7">Результат:</h4> <pre><code >Array ( [0] => admin@mail.ru [1] => admin@ya.ru )</code></pre> <h2 id="tsveta"> Цвета </h2> <h3 id="hex-hexa">HEX/HEXA</h3> <pre><code >$css = ' body < color: #000; background: #4545; >header < color: #111111; background: #00000080; >'; preg_match_all('/#(?:[0-9a-f])/i', $css, $matches); print_r($matches[0]);</code></pre> <h4 id="rezultat-8">Результат:</h4> <pre><code >Array ( [0] => #000 [1] => #4545 [2] => #111111 [3] => #00000080 )</code></pre> <h3 id="rgb-rgba">RGB/RGBA</h3> <pre><code >$css = ' body < color: rgb(0,0,0); background: rgba(17,85,68,0.33); >header < color: rgb(17,17,17); background: rgba(0,0,0,0.5); >'; preg_match_all('/((rgba)\((\d,\s?)(1|0?\.?\d+)\)|(rgb)\(\d(,\s?\d)\))/i', $css, $matches); print_r($matches[0]);</code></pre> <pre><code >Array ( [0] => rgb(0,0,0) [1] => rgba(17,85,68,0.33) [2] => rgb(17,17,17) [3] => rgba(0,0,0,0.5) )</code></pre> <p><a href="https://snipp.ru/php/preg-match">Источник</a></p> <h2 id="kak-nayti-vse-ssylki-na-stranitse-cherez">Как найти все ссылки на странице через PHP</h2> <p><img decoding="async" src="data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%200%200'%3E%3C/svg%3E" alt="Как найти все ссылки на странице через PHP" data-lazy-src="https://myrusakov.ru/images/articles/php-find-links.jpg"/><noscript><img decoding="async" src="https://myrusakov.ru/images/articles/php-find-links.jpg" alt="Как найти все ссылки на странице через PHP"/></noscript></p> <p>Иногда перед программистом стоит не самая простая задача: <b>найти все ссылки на странице с помощью PHP</b>. Где это может быть нужно? Да, много где, например, при выводе одного сайта на другом. Для этого требуется вытащить из него все ссылки и заменить на другие. Также <b>поиск ссылок используется при создании ЧПУ-ссылок</b>, ведь нужно вытащить все старые ссылки и поставить заместо них новые. В общем, задач можно придумать много, но ключевой вопрос всего один: «<b>Как найти все ссылки на странице через PHP?</b>«. Об этом я и написал данную статью.</p> <p>Кто имеет хотя бы маленький опыт, тут же скажет, что надо написать регулярное выражение и будет абсолютно прав. Действительно, простыми строковыми функциями данную задачу будет крайне трудно решить. Ведь каждый пишет по-разному, кто-то прописными бувами, кто-то строчными, кто-то ставит пробел после, например, знака «<b>=</b>«, а кто-то нет. У кого-то двойные кавычки, а у кого-то одинарные. В общем, разновидностей очень много. И единственная возможность предусмотреть максимум всего — это регулярное выражение.</p> <p>Самая сложная часть — это регулярное выражение, ради его публикации данная статья и создавалась, чтобы новичкам не пришлось писать нечто подобное. Хотя это и является очень полезным, но сразу новичок такое никогда не напишет, а для решения задачи это требуется. Конечно, данное регулярное выражение по поиску ссылок неидеальное (едва ли можно написать идеальное), но, думаю, что <b>99%</b> ссылок будут найдены. А если код писал адекватный верстальщик, то все <b>100%</b>. А как работать с найденными ссылками дальше, это уже отдельная история.</p><script data-noptimize="" data-wpfc-render="false"> fpm_start( "true" ); </script> <p><img decoding="async" src="data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%200%200'%3E%3C/svg%3E" data-lazy-src="https://myrusakov.ru/images/date_article.png"/><noscript><img decoding="async" src="https://myrusakov.ru/images/date_article.png"/></noscript></p> <p><img decoding="async" src="data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%200%200'%3E%3C/svg%3E" data-lazy-src="https://myrusakov.ru/images/icon_user.png"/><noscript><img decoding="async" src="https://myrusakov.ru/images/icon_user.png"/></noscript></p> <p>Создано 26.09.2012 10:08:17</li> <li>Михаил Русаков</li> </ul> <p><i>Копирование материалов разрешается только с указанием автора (Михаил Русаков) и индексируемой прямой ссылкой на сайт (http://myrusakov.ru)!</i></p> <p>Добавляйтесь ко мне в друзья <b>ВКонтакте</b>: http://vk.com/myrusakov.<br/>Если Вы хотите дать оценку мне и моей работе, то напишите её в моей группе: http://vk.com/rusakovmy.</p> <p>Если Вы не хотите пропустить новые материалы на сайте,<br/>то Вы можете <b>подписаться на обновления</b>: Подписаться на обновления</p> <p>Если у Вас остались какие-либо вопросы, либо у Вас есть желание высказаться по поводу этой статьи, то Вы можете оставить свой комментарий внизу страницы.</p> <p>Порекомендуйте эту статью друзьям:</p> <p>Если Вам понравился сайт, то разместите ссылку на него (у себя на сайте, на форуме, в контакте):</p> <ol> <li>Кнопка: <br/>Она выглядит вот так:</li> <li>Текстовая ссылка: <br/>Она выглядит вот так: Как создать свой сайт</li> <li>BB-код ссылки для форумов (например, можете поставить её в подписи): </li> </ol> <h2 id="kommentarii-7">Комментарии ( 7 ):</h2> <p>а почему бы просто не воспользоваться функцией getElementsByTagNam(‘a’) ?</p> <p>SoffRick http://php.net/manual/ru/class.domdocument.php почитайте, а потом умничайте</p> <p>А DOM в таком случае не целесообразнее использовать? Вроде и проще, и, к тому же, есть достаточно библиотек для этого.</p> <p><a href="https://myrusakov.ru/php-find-links.html">Источник</a></p> <h2 id="find-and-extract-all-links-from-a-html-string">Find and Extract All links From a HTML String in PHP</h2> <p><img decoding="async" src="data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%200%200'%3E%3C/svg%3E" data-lazy-src="https://onlinewebtutorblog.com/ezoimgfmt/i0.wp.com/onlinewebtutorblog.com/wp-content/uploads/2021/09/Find-and-Extract-All-links-From-a-HTML-String-in-PHP.png?ezimgfmt=rs%3Adevice%2Frscb5-1&ssl=1&w=725"/><noscript><img decoding="async" src="https://onlinewebtutorblog.com/ezoimgfmt/i0.wp.com/onlinewebtutorblog.com/wp-content/uploads/2021/09/Find-and-Extract-All-links-From-a-HTML-String-in-PHP.png?ezimgfmt=rs%3Adevice%2Frscb5-1&ssl=1&w=725"/></noscript></p> <p>Inside this article we will see the concept of find and extract all links from a HTML string in php. Concept of this article will provide very classified information to understand the things.</p> <p>This PHP tutorial is based on how to extract all links and their anchor text from a HTML string. In this guide, we will see how to fetch the HTML content of a web page by URL and then extract the links from it. To do this, we will be use PHP’s <strong>DOMDocument</strong> class.</p> <p>DOMDocument of PHP also termed as PHP DOM Parser. We will see step by step concept to find and extract all links from a html using DOM parser.</p> <h2 id="example-1-get-all-links-from-html-string">Example 1: Get All Links From HTML String Value</h2> <p>Inside this example we will consider a HTML string value. From that html value we will extract all links.</p> <p>Create file index.php inside your application.</p> <p>Open index.php and write this complete code into it.</p> <pre> <body>Google Youtube Online Web Tutor </body> </html>"; //Create a new DOMDocument object. $htmlDom = new DOMDocument; //Load the HTML string into our DOMDocument object. @$htmlDom->loadHTML($htmlString); //Extract all anchor elements / tags from the HTML. $anchorTags = $htmlDom->getElementsByTagName('a'); //Create an array to add extracted images to. $extractedAnchors = array(); //Loop through the anchors tags that DOMDocument found. foreach($anchorTags as $anchorTag)< //Get the href attribute of the anchor. $aHref = $anchorTag->getAttribute('href'); //Get the title text of the anchor, if it exists. $aTitle = $anchorTag->getAttribute('title'); //Add the anchor details to $extractedAnchors array. $extractedAnchors[] = array( 'href' => $aHref, 'title' => $aTitle ); > echo "<pre>"; //print_r our array of anchors. print_r($extractedAnchors);</pre> <p><img decoding="async" src="data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%200%200'%3E%3C/svg%3E" data-lazy-src="https://onlinewebtutorblog.com/ezoimgfmt/i2.wp.com/onlinewebtutorblog.com/wp-content/uploads/2021/09/html-domdocument-object-html-parser-in-PHP.png?w=632&ssl=1"/><noscript><img decoding="async" src="https://onlinewebtutorblog.com/ezoimgfmt/i2.wp.com/onlinewebtutorblog.com/wp-content/uploads/2021/09/html-domdocument-object-html-parser-in-PHP.png?w=632&ssl=1"/></noscript></p> <p>When we run index.php. Here is the output<img decoding="async" src="data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%200%200'%3E%3C/svg%3E" data-lazy-src="https://onlinewebtutorblog.com/ezoimgfmt/i1.wp.com/onlinewebtutorblog.com/wp-content/uploads/2021/09/get-all-links-from-html-string-php-domdocument-object.png?w=455&ssl=1"/><noscript><img decoding="async" src="https://onlinewebtutorblog.com/ezoimgfmt/i1.wp.com/onlinewebtutorblog.com/wp-content/uploads/2021/09/get-all-links-from-html-string-php-domdocument-object.png?w=455&ssl=1"/></noscript> <img decoding="async" src="data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%200%200'%3E%3C/svg%3E" data-lazy-src="https://onlinewebtutorblog.com/ezoimgfmt/i0.wp.com/onlinewebtutorblog.com/wp-content/uploads/2021/09/php-dom-document-object-html-get-all-links.png?w=823&ssl=1"/><noscript><img decoding="async" src="https://onlinewebtutorblog.com/ezoimgfmt/i0.wp.com/onlinewebtutorblog.com/wp-content/uploads/2021/09/php-dom-document-object-html-get-all-links.png?w=823&ssl=1"/></noscript></p> <h2 id="example-2-get-all-links-from-a-web-page">Example 2: Get All Links From a Web Page</h2> <p>Inside this example we will use web page URL to get all links.</p> <p>Create file index.php inside your application.</p> <p>Open index.php and write this complete code into it.</p> <pre>loadHTML($htmlString); //Extract all anchor elements / tags from the HTML. $anchorTags = $htmlDom->getElementsByTagName('a'); //Create an array to add extracted images to. $extractedAnchors = array(); //Loop through the anchors tags that DOMDocument found. foreach($anchorTags as $anchorTag)< //Get the href attribute of the anchor. $aHref = $anchorTag->getAttribute('href'); //Get the title text of the anchor, if it exists. $aTitle = $anchorTag->getAttribute('title'); //Add the anchor details to $extractedAnchors array. $extractedAnchors[] = array( 'href' => $aHref, 'title' => $aTitle ); > echo "<pre>"; //print_r our array of anchors. print_r($extractedAnchors);</pre> <p><img decoding="async" src="data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%200%200'%3E%3C/svg%3E" data-lazy-src="https://onlinewebtutorblog.com/ezoimgfmt/i2.wp.com/onlinewebtutorblog.com/wp-content/uploads/2021/09/web-page-links-find-and-extract-php-domdocument-object.png?w=724&ssl=1"/><noscript><img decoding="async" src="https://onlinewebtutorblog.com/ezoimgfmt/i2.wp.com/onlinewebtutorblog.com/wp-content/uploads/2021/09/web-page-links-find-and-extract-php-domdocument-object.png?w=724&ssl=1"/></noscript></p> <p>When we run index.php. Here is the output</p> <p>We hope this article helped you to Find and Extract All links From a HTML String in PHP Tutorial in a very detailed way.</p> <p>Online Web Tutor invites you to try <strong>Skillshike</strong>! Learn CakePHP, Laravel, CodeIgniter, Node Js, MySQL, Authentication, RESTful Web Services, etc into a depth level. Master the Coding Skills to Become an Expert in PHP Web Development. So, Search your favourite course and enroll now.</p> <p>If you liked this article, then please subscribe to our <strong>YouTube Channel</strong> for PHP & it’s framework, WordPress, Node Js video tutorials. You can also find us on <strong>Twitter</strong> and <strong>Facebook</strong>.</p> <h3 id="related-posts">Related Posts:</h3> <p><a href="https://onlinewebtutorblog.com/find-and-extract-all-links-from-a-html-string-in-php/">Источник</a></p> <h2 id="kak-sobrat-vse-ssylki-na-sayte-php">Как собрать все ссылки на сайте, php?</h2> <p>Ребят. Как собрать все ссылки, которые есть на сайте, а так же файлы, картинки и другие? <br/>Регуряное выражение уже написал. <br/>А вот как это собрать с каждой странице, у меня не получается. Потому что надо учесть что бы не было дубликатов и что бы по каждой ссылке парсер прошелся одни раз. <br/>Тут надо скорее всего рекурсивно проходить? Если да, то я что-то запутался в этой рекурсии. <br/>Может уже кто готовое знает или уже кто писал на php?</p> <p>ВОт что я пробовал написать: <br/>getURL() - функция, которая скачивает файл. Я ее не стал сюда вписывать.</p> <pre><code >$arr_link = array(); function get_first_link($site) < $result = getURL($site); $result = implode($result); if($result === false)preg_match_all("/[^>]*[Hh][Rr][Ee][Ff][^=]*=[ '\"\s]*([^ \"'>\s#]+)[^>]*>/", $result, $matches); $urls = $matches[1]; $urls = array_unique($urls); foreach($urls as $val)< // echo $val."<br />"; // вывожу все ссылки $link = parse_url($val); if(empty($link['host']))< // $flag = in_array($val, $arr_link); // if($flag === false)< $arr_link[] = SITE.$val; // echo SITE.$val."<br />"; // > //get_link($site.$val); > > return $arr_link; > function get_second_link($arr)< foreach ($arr as $val) < $result = getURL($val); $result = implode($result); //print_r($result); preg_match_all("/[^>]*[Hh][Rr][Ee][Ff][^=]*=[ '\"\s]*([^ \"'>\s#]+)[^>]*>/", $result, $matches); $all[] = $matches[1]; > $urls = $all; $urls = array_unique($urls); print_r($urls); > // print_r(get_first_link(SITE)); $n = get_first_link(SITE); get_second_link($n);</code></pre> <p>Оценить <strong>1</strong> комментарий</p> <p><img decoding="async" src="data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%200%200'%3E%3C/svg%3E" alt="dskripchenko" data-lazy-src="https://habrastorage.org/r/w60/files/dce/47d/953/dce47d953c3a4588b293b14277a2cfdd.jpg"/><noscript><img decoding="async" src="https://habrastorage.org/r/w60/files/dce/47d/953/dce47d953c3a4588b293b14277a2cfdd.jpg" alt="dskripchenko"/></noscript></p> <pre><code >/** * Date: 05.05.17 * Time: 17:42 */ namespace app\components; /** * Class UrlGrabberService * @package app\components */ class UrlGrabberService < public $newLink = []; public $savedLink = []; public $siteUrl = false; /** * @return static */ public static function getInstance()< return new static(); >/** * @param $url * @return array */ public function getAllLinkBySite($url)< $this->newLink = $this->getAllLinkByUrl($url); while(!empty($this->newLink))< $link = array_shift($this->newLink); $this->savedLink[] = $link; $this->addLinkByUrl($link); > return $this->savedLink; > /** * @param $url * @return array */ protected function getAllLinkByUrl($url) < $pattern = '/<a[\s\W]*?href\S*?=\S*?[\'"](\/\w.*?)\/?[\'"]/'; $headers = @get_headers($url); if(strpos($headers[0],'200')===false)< $result = []; >else< $opts = array('https'=>array('header' => "User-Agent:MyAgent/1.0\r\n")); $context = stream_context_create($opts); $content = \file_get_contents($url,false,$context); $matches = []; preg_match_all($pattern,$content,$matches); $result = array_unique($matches[1]); > return $result; > /** * @param $url */ protected function addLinkByUrl($url)< $this->newLink = array_merge($this->newLink,$this->getAllLinkByUrl($this->siteUrl . $url)); $this->newLink = array_unique($this->newLink); $this->newLink = array_diff($this->newLink, $this->savedLink); > ></code></pre> <pre><code >$result = UrlGrabberService::getInstance()->getAllLinkBySite('http://example.com');</code></pre> <p>Вот этот парсер использовал, легко переписать и изменить шаблон с xml на нужный тебе. Достаточно быстро прогуливается по сайту, собирает ссылки и редиректы поддерживает. Рекурсия как-раз.</p> <h3 id="voydite-chtoby-napisat-otvet">Войдите, чтобы написать ответ</h3> <h2 id="kakoy-samyy-prostoy-sposob-sobrat-pdf-fayl"> Какой самый простой способ собрать PDF файл с данными из БД? </h2> <p><a href="https://qna.habr.com/q/423088">Источник</a></p> <div class="fpm_end"></div><div style="clear:both; margin-top:0em; margin-bottom:1em;"><a href="https://laptopprocessors.ru/border-solid-html-code/" target="_blank" rel="dofollow" class="u0bff8afcedd9bc686d11a515e0714575"><style> .u0bff8afcedd9bc686d11a515e0714575 { padding:0px; margin: 0; padding-top:1em!important; padding-bottom:1em!important; width:100%; display: block; font-weight:bold; background-color:#eaeaea; border:0!important; border-left:4px solid #34495E!important; text-decoration:none; } .u0bff8afcedd9bc686d11a515e0714575:active, .u0bff8afcedd9bc686d11a515e0714575:hover { opacity: 1; transition: opacity 250ms; webkit-transition: opacity 250ms; text-decoration:none; } .u0bff8afcedd9bc686d11a515e0714575 { transition: background-color 250ms; webkit-transition: background-color 250ms; opacity: 1; transition: opacity 250ms; webkit-transition: opacity 250ms; } .u0bff8afcedd9bc686d11a515e0714575 .ctaText { font-weight:bold; color:#464646; text-decoration:none; font-size: 16px; } .u0bff8afcedd9bc686d11a515e0714575 .postTitle { color:#000000; text-decoration: underline!important; font-size: 16px; } .u0bff8afcedd9bc686d11a515e0714575:hover .postTitle { text-decoration: underline!important; } </style><div style="padding-left:1em; padding-right:1em;"><span class="ctaText">Читайте также:</span>  <span class="postTitle">Border solid html code</span></div></a></div> </div><!-- .entry-content --> </article> <div class="rating-box"> <div class="rating-box__header">Оцените статью</div> <div class="wp-star-rating js-star-rating star-rating--score-0" data-post-id="176344" data-rating-count="0" data-rating-sum="0" data-rating-value="0"><span class="star-rating-item js-star-rating-item" data-score="1"><svg aria-hidden="true" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" class="i-ico"><path fill="currentColor" d="M259.3 17.8L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0z" class="ico-star"></path></svg></span><span class="star-rating-item js-star-rating-item" data-score="2"><svg aria-hidden="true" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" class="i-ico"><path fill="currentColor" d="M259.3 17.8L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0z" class="ico-star"></path></svg></span><span class="star-rating-item js-star-rating-item" data-score="3"><svg aria-hidden="true" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" class="i-ico"><path fill="currentColor" d="M259.3 17.8L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0z" class="ico-star"></path></svg></span><span class="star-rating-item js-star-rating-item" data-score="4"><svg aria-hidden="true" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" class="i-ico"><path fill="currentColor" d="M259.3 17.8L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0z" class="ico-star"></path></svg></span><span class="star-rating-item js-star-rating-item" data-score="5"><svg aria-hidden="true" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" class="i-ico"><path fill="currentColor" d="M259.3 17.8L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0z" class="ico-star"></path></svg></span></div> </div> <div class="entry-social"> <div class="social-buttons"><span class="social-button social-button--vkontakte" data-social="vkontakte" data-image=""></span><span class="social-button social-button--facebook" data-social="facebook"></span><span class="social-button social-button--telegram" data-social="telegram"></span><span class="social-button social-button--odnoklassniki" data-social="odnoklassniki"></span><span class="social-button social-button--twitter" data-social="twitter"></span><span class="social-button social-button--sms" data-social="sms"></span><span class="social-button social-button--whatsapp" data-social="whatsapp"></span></div> </div> <meta itemprop="author" content="admin"> <meta itemscope itemprop="mainEntityOfPage" itemType="https://schema.org/WebPage" itemid="https://laptopprocessors.ru/teg-title-14/" content="Тег TITLE"> <meta itemprop="dateModified" content="2023-08-26"> <meta itemprop="datePublished" content="2023-08-29T11:31:13+03:00"> <div itemprop="publisher" itemscope itemtype="https://schema.org/Organization" style="display: none;"><meta itemprop="name" content="Программирование"><meta itemprop="telephone" content="Программирование"><meta itemprop="address" content="https://laptopprocessors.ru"></div> </main><!-- #main --> </div><!-- #primary --> <aside id="secondary" class="widget-area" itemscope itemtype="http://schema.org/WPSideBar"> <div class="sticky-sidebar js-sticky-sidebar"> <div id="block-2" class="widget widget_block"><div class="flatPM_sidebar" data-top="70"> <div id="Q_sidebar"></div> </div></div> </div> </aside><!-- #secondary --> <div id="related-posts" class="related-posts fixed"><div class="related-posts__header">Вам также может понравиться</div><div class="post-cards post-cards--vertical"> <div class="post-card post-card--related post-card--thumbnail-no"> <div class="post-card__title"><a href="https://laptopprocessors.ru/yaschiki-s-usami-python/">Ящики с усами python</a></div><div class="post-card__description">pandas.plotting.boxplot# Make a box-and-whisker plot</div> </div> <div class="post-card post-card--related post-card--thumbnail-no"> <div class="post-card__title"><a href="https://laptopprocessors.ru/primer-ispolzovaniya-svoystva-css-table-layout-74/">Пример использования свойства CSS table-layout.</a></div><div class="post-card__description">table-layout¶ Свойство table-layout определяет, как</div> </div> <div class="post-card post-card--related post-card--thumbnail-no"> <div class="post-card__title"><a href="https://laptopprocessors.ru/primer-ispolzovaniya-svoystva-css-table-layout-73/">Пример использования свойства CSS table-layout.</a></div><div class="post-card__description">HTML Размеры таблицы HTML таблицы могут иметь разные</div> </div> <div class="post-card post-card--related post-card--thumbnail-no"> <div class="post-card__title"><a href="https://laptopprocessors.ru/primer-ispolzovaniya-svoystva-css-table-layout-72/">Пример использования свойства CSS table-layout.</a></div><div class="post-card__description">table-layout¶ Свойство table-layout определяет, как</div> </div> </div></div> </div><!--.site-content-inner--> </div><!--.site-content--> <div class="site-footer-container "> <div class="footer-navigation fixed" itemscope itemtype="http://schema.org/SiteNavigationElement"> <div class="main-navigation-inner full"> <div class="menu-tehnicheskoe-menyu-container"><ul id="footer_menu" class="menu"><li id="menu-item-12637" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-12637"><a href="https://laptopprocessors.ru/pravoobladatelyam/">Правообладателям</a></li> <li id="menu-item-12638" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-12638"><a href="https://laptopprocessors.ru/politika-konfidentsialnosti/">Политика конфиденциальности</a></li> <li id="menu-item-12639" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-12639"><a href="https://laptopprocessors.ru/kontakty/">Контакты</a></li> </ul></div> </div> </div><!--footer-navigation--> <footer id="colophon" class="site-footer site-footer--style-gray full"> <div class="site-footer-inner fixed"> <div class="footer-bottom"> <div class="footer-info"> © 2023 Программирование </div> <div class="footer-counters"><!-- Yandex.Metrika counter --> <script type="text/javascript" > (function(m,e,t,r,i,k,a){m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)}; m[i].l=1*new Date(); for (var j = 0; j < document.scripts.length; j++) {if (document.scripts[j].src === r) { return; }} k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)}) (window, document, "script", "https://mc.yandex.ru/metrika/tag.js", "ym"); ym(94646255, "init", { clickmap:true, trackLinks:true, accurateTrackBounce:true, webvisor:true }); </script> <noscript><div><img src="https://mc.yandex.ru/watch/94646255" style="position:absolute; left:-9999px;" alt="" /></div></noscript> <!-- /Yandex.Metrika counter --></div></div> </div> </footer><!--.site-footer--> </div> <button type="button" class="scrolltop js-scrolltop"></button> </div><!-- #page --> <script>var pseudo_links = document.querySelectorAll(".pseudo-clearfy-link");for (var i=0;i<pseudo_links.length;i++ ) { pseudo_links[i].addEventListener("click", function(e){ window.open( e.target.getAttribute("data-uri") ); }); }</script><script type='text/javascript' id='reboot-scripts-js-extra'> /* <![CDATA[ */ var settings_array = {"rating_text_average":"\u0441\u0440\u0435\u0434\u043d\u0435\u0435","rating_text_from":"\u0438\u0437","lightbox_display":"1","sidebar_fixed":"1"}; var wps_ajax = {"url":"https:\/\/laptopprocessors.ru\/wp-admin\/admin-ajax.php","nonce":"913845b5ce"}; /* ]]> */ </script> <script src='https://laptopprocessors.ru/wp-content/themes/reboot/assets/js/scripts.min.js' id='reboot-scripts-js'></script> <script>window.lazyLoadOptions = { elements_selector: "img[data-lazy-src],.rocket-lazyload,iframe[data-lazy-src]", data_src: "lazy-src", data_srcset: "lazy-srcset", data_sizes: "lazy-sizes", class_loading: "lazyloading", class_loaded: "lazyloaded", threshold: 300, callback_loaded: function(element) { if ( element.tagName === "IFRAME" && element.dataset.rocketLazyload == "fitvidscompatible" ) { if (element.classList.contains("lazyloaded") ) { if (typeof window.jQuery != "undefined") { if (jQuery.fn.fitVids) { jQuery(element).parent().fitVids(); } } } } }}; window.addEventListener('LazyLoad::Initialized', function (e) { var lazyLoadInstance = e.detail.instance; if (window.MutationObserver) { var observer = new MutationObserver(function(mutations) { var image_count = 0; var iframe_count = 0; var rocketlazy_count = 0; mutations.forEach(function(mutation) { for (i = 0; i < mutation.addedNodes.length; i++) { if (typeof mutation.addedNodes[i].getElementsByTagName !== 'function') { return; } if (typeof mutation.addedNodes[i].getElementsByClassName !== 'function') { return; } images = mutation.addedNodes[i].getElementsByTagName('img'); is_image = mutation.addedNodes[i].tagName == "IMG"; iframes = mutation.addedNodes[i].getElementsByTagName('iframe'); is_iframe = mutation.addedNodes[i].tagName == "IFRAME"; rocket_lazy = mutation.addedNodes[i].getElementsByClassName('rocket-lazyload'); image_count += images.length; iframe_count += iframes.length; rocketlazy_count += rocket_lazy.length; if(is_image){ image_count += 1; } if(is_iframe){ iframe_count += 1; } } } ); if(image_count > 0 || iframe_count > 0 || rocketlazy_count > 0){ lazyLoadInstance.update(); } } ); var b = document.getElementsByTagName("body")[0]; var config = { childList: true, subtree: true }; observer.observe(b, config); } }, false);</script><script data-no-minify="1" async src="https://laptopprocessors.ru/wp-content/plugins/rocket-lazy-load/assets/js/16.1/lazyload.min.js"></script><script>function lazyLoadThumb(e){var t='<img loading="lazy" data-lazy-src="https://i.ytimg.com/vi/ID/hqdefault.jpg" alt="" width="480" height="360"><noscript><img src="https://i.ytimg.com/vi/ID/hqdefault.jpg" alt="" width="480" height="360"></noscript>',a='<div class="play"></div>';return t.replace("ID",e)+a}function lazyLoadYoutubeIframe(){var e=document.createElement("iframe"),t="ID?autoplay=1";t+=0===this.dataset.query.length?'':'&'+this.dataset.query;e.setAttribute("src",t.replace("ID",this.dataset.src)),e.setAttribute("frameborder","0"),e.setAttribute("allowfullscreen","1"),e.setAttribute("allow", "accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"),this.parentNode.replaceChild(e,this)}document.addEventListener("DOMContentLoaded",function(){var e,t,a=document.getElementsByClassName("rll-youtube-player");for(t=0;t<a.length;t++)e=document.createElement("div"),e.setAttribute("data-id",a[t].dataset.id),e.setAttribute("data-query", a[t].dataset.query),e.setAttribute("data-src", a[t].dataset.src),e.innerHTML=lazyLoadThumb(a[t].dataset.id),e.onclick=lazyLoadYoutubeIframe,a[t].appendChild(e)});</script> </body> </html>