Автоматизированная фильтрация ссылочной массы.
Долго думал – писать на эту тему или нет. Фактически я отдаю готовый инструмент, который, в своё время, мог существенно облегчить, если даже не заменить помощника SEO-инженера – линк-менеджера.
Что скрипт может сказать про внешнюю ссылку с донора и саму страницу размещения ссылки?
- URL-донор
- TITLE + META
- Анкор
- Окружение ссылки
- Цвет ссылки
- Размер шрифта
- Отступ по горизонтали (позиция ссылки на странице-доноре)
- Отступ по вертикали (позиция ссылки на странице-доноре)
- Номер ссылки в DOM-модели страницы
- Наличие на странице объявлений Яндекс.Директ
- Наличие на странице объявлений Google.Adwords
- Наличие на странице социальных элементов
- Наличие на странице блоков тизерные сети
- Наличие на popunder-ов
- Слов на странице (значимых слов, без верстки и меню)
- Символов (значимых символов, без верстки и меню)
- Ссылок на странице
- Внутренних ссылок
- Внешних ссылок
- Индексируемых ВС
- Индексируемых ВС (без JS)
- Уникальность текста (в процентах)
Скрипт написан на PHP, но запускается только под Windows с установленным браузером IE. Все дело в том, что скрипт взаимодействует с IE, чтобы получать не только HTML-код страницы донора и «парсить» её, но и получать DOM страницы, сформированный после выполнения всех JS-скриптом.
Почему это так важно?
Обычные программы групповой аналитики доноров берут чистый HTML (до обработки JS-скриптов) и на его основании делают выводы и о положении ссылки и о её цвете, размере, и о числе внешних ссылок. Затем выполняются многочисленные JS-скрипты и ссылка меняет цвет, исчезает с экрана, а внешних ссылок становится не 2, а 150 – и это не преувеличение, а средние цифры. Поисковые машины анализируют сайт именно так, как его будет видеть пользователь. Поэтому без использования моего скрипта просто не обойтись.
Кроме того, в части анализа контента скрипт анализирует число слов и символов не на всем сайте, как правило, навигационные части, теги, каталог – 90% текста на странице, однако он не несет смысловой нагрузки и игнорируется как поисковыми системами так и моим скриптом. Удаление верстки реализовано на принципах алгоритма – шинглов.
Как пользоваться скриптом?
«Сайты-доноры» – сайты размещающие Вашу ссылку, «продвигаемый сайт» – размещаемая ссылка.
Результат работы скрипта:
Как интерпретировать результаты я рассказывать не буду – и так, опубликованный инструмент никогда раньше не появлялся в публичном доступе и аналогов ему просто нет.
Сам скрипт:
<? header('Content-Type: text/html; charset=windows-1251'); ?> <style> html, body { font-family: Tahoma, Arial; font-size: 12px; } .main_table { border-collapse: collapse; } .main_table td { font-size: 12px; border: 1px solid #DFDFDF; } .main_table tr { background-color: #F9F9F9; } .main_table TR.even { background-color: #FFFFFF; } .tr_h td { background: #DFDFDF; text-align: center; } </style> <body> <? set_time_limit(0); exec("taskkill /f /im iexplore.exe"); $url_array = isset($_POST['url_array']) ? $_POST['url_array'] : null; if (empty($url_array)){ ?> <form name="url" action="/" method="post"> Сайты-доноры: <br /> <textarea name="url_array" rows=15 cols=50 wrap="on"></textarea> <br /><br /> Продвигаемый сайт: <br /> <input style="width: 430px" name="url_acseptor" type="text" value=""> <br /><br /> <input type="submit" value="Проверка ВФ"> </form> <? die(); } function getResultPost($text_uid){ $postQuery = array(); $postQuery['uid'] = $text_uid; $postQuery['userkey'] = ""; $postQuery = http_build_query($postQuery, '', '&'); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'http://api.text.ru/post'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $postQuery); $json = curl_exec($ch); $errno = curl_errno($ch); if (!$errno) { $resCheck = json_decode($json); if (isset($resCheck->text_unique)) { $text_unique = $resCheck->text_unique; $result_json = $resCheck->result_json; return $text_unique; } else { $error_code = $resCheck->error_code; $error_desc = $resCheck->error_desc; if ($error_code == 181) return 'w'; else return 'e'; } } else { $errmsg = curl_error($ch); } curl_close($ch); } function check_text($text, $site){ $postQuery = array(); $text = iconv('CP1251', 'UTF-8', $text); $postQuery['text'] = $text; $postQuery['userkey'] = ""; $postQuery['exceptdomain'] = $site; $postQuery = http_build_query($postQuery, '', '&'); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'http://api.text.ru/post'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $postQuery); $json = curl_exec($ch); $errno = curl_errno($ch); // если произошла ошибка if (!$errno) { $resAdd = json_decode($json); if (isset($resAdd->text_uid)) { $text_uid = $resAdd->text_uid; return $text_uid; } else { $error_code = $resAdd->error_code; $error_desc = $resAdd->error_desc; return 0; } } else { $errmsg = curl_error($ch); } curl_close($ch); } function get_codepage($text = '') { if (!empty($text)) { $utflower = 7; $utfupper = 5; $lowercase = 3; $uppercase = 1; $last_simb = 0; $charsets = array( 'UTF-8' => 0, 'CP1251' => 0, 'KOI8-R' => 0, 'IBM866' => 0, 'ISO-8859-5' => 0, 'MAC' => 0, ); for ($a = 0; $a < strlen($text); $a++) { $char = ord($text[$a]); // non-russian characters if ($char<128 || $char>256) continue; // UTF-8 if (($last_simb==208) && (($char>143 && $char<176) || $char==129)) $charsets['UTF-8'] += ($utfupper * 2); if ((($last_simb==208) && (($char>175 && $char<192) || $char==145)) || ($last_simb==209 && $char>127 && $char<144)) $charsets['UTF-8'] += ($utflower * 2); // CP1251 if (($char>223 && $char<256) || $char==184) $charsets['CP1251'] += $lowercase; if (($char>191 && $char<224) || $char==168) $charsets['CP1251'] += $uppercase; // KOI8-R if (($char>191 && $char<224) || $char==163) $charsets['KOI8-R'] += $lowercase; if (($char>222 && $char<256) || $char==179) $charsets['KOI8-R'] += $uppercase; // IBM866 if (($char>159 && $char<176) || ($char>223 && $char<241)) $charsets['IBM866'] += $lowercase; if (($char>127 && $char<160) || $char==241) $charsets['IBM866'] += $uppercase; // ISO-8859-5 if (($char>207 && $char<240) || $char==161) $charsets['ISO-8859-5'] += $lowercase; if (($char>175 && $char<208) || $char==241) $charsets['ISO-8859-5'] += $uppercase; // MAC if ($char>221 && $char<255) $charsets['MAC'] += $lowercase; if ($char>127 && $char<160) $charsets['MAC'] += $uppercase; $last_simb = $char; } arsort($charsets); return key($charsets); } } $url_array = explode("\r", $url_array); $url_f = isset($_POST['url_acseptor']) ? $_POST['url_acseptor'] : null; function RemVerst($text_1, $text_2){ $text_1 = preg_replace('|<select.*</select>|iUs', '', $text_1); $text_1 = preg_replace('|<noindex.*</noindex>|iUs', '', $text_1); $text_1 = preg_replace('|<script.*</script>|iUs', '', $text_1); $text_1 = preg_replace('|<applet.*</applet>|iUs', '', $text_1); $text_1 = preg_replace('|<style.*</style>|iUs', '', $text_1); $text_1 = preg_replace('|<!--.*-->|iUs', '', $text_1); $text_2 = preg_replace('|<select.*</select>|iUs', '', $text_2); $text_2 = preg_replace('|<noindex.*</noindex>|iUs', '', $text_2); $text_2 = preg_replace('|<script.*</script>|iUs', '', $text_2); $text_2 = preg_replace('|<applet.*</applet>|iUs', '', $text_2); $text_2 = preg_replace('|<style.*</style>|iUs', '', $text_2); $text_2 = preg_replace('|<!--.*-->|iUs', '', $text_2); $text_1 = strip_tags($text_1); $text_2 = strip_tags($text_2); $text_1 = str_replace("\r",' ',$text_1); $text_2 = str_replace("\r",' ',$text_2); $text_1 = str_replace("\n\n",' ',$text_1); $text_2 = str_replace("\n\n",' ',$text_2); $text_1 = str_replace("\n",' ',$text_1); $text_2 = str_replace("\n",' ',$text_2); $text_1 = str_replace("\t",' ',$text_1); $text_2 = str_replace("\t",' ',$text_2); $text_1 = str_replace(" ",' ',$text_1); $text_2 = str_replace(" ",' ',$text_2); $text_1 = str_replace(" ",' ',$text_1); $text_2 = str_replace(" ",' ',$text_2); $text_1 = preg_replace('|&.*;|iUs', '', $text_1); $text_2 = preg_replace('|&.*;|iUs', '', $text_2); $text_1 = preg_replace('|\s{1,}|', ' ', $text_1); $text_2 = preg_replace('|\s{1,}|', ' ', $text_2); if (!empty($text_1) && !empty($text_2)){ if (strlen($text_1) >= strlen($text_2)){ $b_1 = true; $big = explode(' ',$text_1); $small = explode(' ',$text_2); $big_text = $text_1; $small_text = $text_2; } else { $b_2 = true; $small = explode(' ',$text_1); $big = explode(' ',$text_2); $big_text = $text_2; $small_text = $text_1; } foreach ($big as &$value){ if (trim($value) == '') unset($value); else $value = trim($value); } foreach ($small as &$value){ if (trim($value) == '') unset($value); else $value = trim($value); } $l = count($big); for($i=0;$i<$l-3;$i++) { $sh['big'][md5($big[$i].' '.$big[$i+1].' '.$big[$i+2].' '.$big[$i+3])] = $big[$i].' '.$big[$i+1].' '.$big[$i+2].' '.$big[$i+3]; } $l = count($small); for($i=0;$i<$l-3;$i++) { $sh['small'][md5($small[$i].' '.$small[$i+1].' '.$small[$i+2].' '.$small[$i+3])] = $small[$i].' '.$small[$i+1].' '.$small[$i+2].' '.$small[$i+3]; } $big_c = 0; if (!empty($sh['small']) && !empty($sh['big'])){ foreach ($sh['big'] as $sh_big_key => $sh_big){ $j = 0; foreach ($sh['small'] as $sh_small_key => $sh_small){ if ($sh_big_key == $sh_small_key){ $j = 1; $all_small[$sh_small_key] = '<b>'.$sh_small_key.'</b>'; $big_text = str_replace($sh_small,'',$big_text); $small_text = str_replace($sh_small,'',$small_text); } else { if ($all_small[$sh_small_key] != '<b>'.$sh_small_key.'</b>') $all_small[$sh_small_key] = $sh_small_key; } } if ($j == 1){ $all_big[] = '<b>'.$sh_big_key.'</b>'; $big_c++; } else $all_big[] = $sh_big_key; } } if ($b_1 == true){ $text_array['text_1'] = $big_text; $text_array['text_2'] = $small_text; return $text_array; } else { $text_array['text_1'] = $small_text; $text_array['text_2'] = $big_text; return $text_array; } } } function get_domain($url){ $url_parce = parse_url($url); $url_host = $url_parce['host']; if ( preg_match('/^www\./i', $url_host) ) { $url_host = substr($url_host, 4); } return $url_host; } function check_link($url_host, $href){ if ( preg_match('/^http(s)?:\/\//i', $href) ) { $href_host = parse_url($href, PHP_URL_HOST); if ( preg_match('/^www\./i', $href_host) ) { $href_host = substr($href_host, 4); } if ( preg_match('/' . preg_quote($url_host) . '$/i', $href_host) ) { if ((!preg_match("@^#@i", $href)) && (!preg_match("@javascript:@i", $href))) return 'in'; } else { return 'out'; } } else { if ((!preg_match("@^#@i", $href)) && (!preg_match("@javascript:@i", $href))) return 'in'; } } function html2txt($document){ $search = array('@<script[^>]*?>.*?</script>@si', // Strip out javascript '@<style[^>]*?>.*?</style>@siU', // Strip style tags properly '@<a[^>]*?>.*?</a>@siU', '@<![\s\S]*?--[ \t\n\r]*>@' // Strip multi-line comments including CDATA ); $text = preg_replace($search, '', $document); return $text; } function stop_word_clear($content){ $content = html2txt($content); $content = mb_strtolower($content); $content = str_replace('.',' ',$content); $content = str_replace('-',' ',$content); $content = str_replace(' ',' ',$content); $content = str_replace('quot',' ',$content); $content = str_replace("\r",' ',$content); $content = str_replace("\r\n",' ',$content); $content = str_replace("\n",' ',$content); $content = preg_replace("@[^а-я ]@i",' ',$content); $content = preg_replace("@ [а-я]{1}( |,)@is",' ',$content); $content = preg_replace("@\s{1,}@is",' ',$content); $content = preg_replace("@( без | и | этого | эти | более | о | об | том | и | бы | был | была | были | было | быть | вам | вас | ведь | весь | вдоль | вместо | вне | вниз | внизу | внутри | во | вокруг | вот | все | всегда | в | всего | всех | вы | где | да | давай | давать | даже | для | до | достаточно | его | ее | её | если | есть | ещё | же | за | за исключением | здесь | из | из-за | или | им | иметь | их | как | как-то | кто | когда | кроме | кто | ли | либо | мне | может | мои | мой | мы | на | навсегда | над | надо | наш | не | него | неё | нет | ни | них | но | ну | об | однако | он | она | они | оно | от | отчего | очень | по | под | после | потому | потому что | почти | при | про | снова | со | так | также | такие | такой | там | те | тем | то | того | тоже | той | только | том | тут | ты | уже | хотя | чего | чего-то | чей | чем | что | чтобы | чьё | чья | эта | эти | это )@is",' ',$content); return $content; } function no_index($elem){ while ($elem = $elem->parentElement) { if ($elem->tagName == 'NOINDEX' || $elem->tagName == 'noindex'){ return true; break; } } return false; } function offset($elem){ $x = $elem->offsetLeft; $y = $elem->offsetTop; while ($elem = $elem->offsetParent) { $x += $elem->offsetLeft; $y += $elem->offsetTop; } return array($x, $y); } $browser = new COM("InternetExplorer.Application") or die("Unable to start IE"); $handle = $browser->HWND; $browser->Visible = false; echo '<table width="100%" border="0" class="main_table">'; echo '<tr class="tr_h">'; echo ' <td width="30">#</td> <td width="300">URL-донор</td> <td style="width:200px" width="200">TITLE + META</td> <td>Анкор</td> <td>Окружение ссылки</td> <td>Цвет ссылки</td> <td>Размер шрифта</td> <td>Отсут по горизонтали</td> <td>Отстут по вертикали</td> <td>Номер ссылки</td> <td>Яндекс.Директ</td> <td>Google.Adwords</td> <td>Социальные элементы</td> <td>Тизерные сети</td> <td>Popunder</td> <td>Слов на старнице</td> <td>Символов</td> <td>Ссылок на странице</td> <td>Внутренних ссылок</td> <td>Внешних ссылок</td> <td>Индексируемых ВС</td> <td>Индексируемых ВС (без JS)</td> <!-- <td>Уникальность текста</td>!--> '; echo '</tr>'; $url_i = 1; foreach ($url_array as $key => $url){ $url = trim($url); $url_host = get_domain($url); if ($url_i % 2 == 0) $ch_f = ''; else $ch_f = 'class="even"'; $j = 0; $browser->Navigate($url); while (($browser->Busy || $browser->ReadyState != 4) && $j <= 75) { com_message_pump(100); $j++; } if ($j >= 75) { echo " <tr $ch_f> <td>$url_i</td> <td><a target=\"_blank\" href=\"$url\">$url</a></td> <td align=\"center\" colspan=\"15\"><i>превышен таймаут</i></td> </tr> "; continue; } try { $title = $browser->Document->title; } catch (Exception $e){ $title = ''; } try { $body_head = $browser->Document->head->innerHTML; } catch (Exception $e){ $body_head = ''; } $body_html = $browser->Document->body->innerHTML; try { $body_text = $browser->Document->body->textContent; } catch (Exception $e){ try { $body_text = $browser->Document->body->innerHTML; } catch (Exception $e){ $body_text = ''; } } $link_in_h = 0; try { $get_from_php = @file_get_contents($url); } catch (Exception $e){ $get_from_php = ''; } $yandex_direct = false; $google_adwords = false; $teaser_system = null; $social_net = null; $popunder_system = null; if (preg_match("@yandex_partner_id@", $get_from_php)) $yandex_direct = true; if (preg_match("@google_ad_client@", $get_from_php)) $google_adwords = true; if (preg_match("@begun.ru@", $get_from_php)) $teaser_system .= '<li>begun.ru</li>'; if (preg_match("@myshowcase.ru@", $get_from_php)) $teaser_system .= '<li>myshowcase.ru</li>'; if (preg_match("@negolist.com@", $get_from_php)) $teaser_system .= '<li>negolist.com</li>'; if (preg_match("@smi2.ru@", $get_from_php)) $teaser_system .= '<li>smi2.ru</li>'; if (preg_match("@adonweb.ru@", $get_from_php)) $teaser_system .= '<li>adonweb.ru</li>'; if (preg_match("@nnn.novoteka.ru@", $get_from_php)) $teaser_system .= '<li>novoteka.ru</li>'; if (preg_match("@ads.adfox.ru@", $get_from_php)) $teaser_system .= '<li>adfox.ru</li>'; if (preg_match("@top.24smi.org@", $get_from_php)) $teaser_system .= '<li>24smi.org</li>'; if (preg_match("@ncl.novostimira.biz@", $get_from_php)) $teaser_system .= '<li>novostimira.biz</li>'; if (preg_match("@directadvert.ru@", $get_from_php)) $teaser_system .= '<li>directadvert.ru</li>'; if (preg_match("@jsc.dt00.net@", $get_from_php)) $teaser_system .= '<li>marketgid.com</li>'; if (preg_match("@f-dsp.adsniper.ru@", $get_from_php)) $teaser_system .= '<li>adsniper.ru</li>'; if (preg_match("@tbn.ru@", $get_from_php)) $teaser_system .= '<li>tbn.ru</li>'; if (preg_match("@is.luxup.ru@", $get_from_php)) $teaser_system .= '<li>adlabs.ru</li>'; if (preg_match("@c1.teaser-goods.ru@", $get_from_php)) $teaser_system .= '<li>teaser-goods.ru</li>'; if (preg_match("@lenta-novostei.com@", $get_from_php)) $teaser_system .= '<li>lenta-novostei.com</li>'; if (preg_match("@n.pay-click.ru@", $get_from_php)) $teaser_system .= '<li>pay-click.ru</li>'; if (preg_match("@bush.home-to-roost.info@", $get_from_php)) $popunder_system .= '<li>bush.home-to-roost.info</li>'; if (preg_match("@archives.musicosser.info@", $get_from_php)) $popunder_system .= '<li>archives.musicosser.info</li>'; if (preg_match("@vk_comments@", $get_from_php)) $social_net .= '<li>Комментарии VK</li>'; if (preg_match("@vk_like@", $get_from_php)) $social_net .= '<li>Like VK</li>'; if (preg_match("@mrc__plugin_uber_like_button@", $get_from_php)) $social_net .= '<li>Like OK || Мой.Мир</li>'; if (preg_match("@www.facebook.com/plugins/like.php@", $get_from_php)) $social_net .= '<li>Like FB</li>'; if (preg_match("@platform.twitter.com/widgets/tweet_button.html@", $get_from_php)) $social_net .= '<li>Like Twitter</li>'; if (preg_match("@connect.facebook.net/ru_RU@", $get_from_php)) $social_net .= '<li>Комментарии FB</li>'; $body_html_noindex = preg_replace('@<noindex>(.*?)</noindex>@is', '', $get_from_php); preg_match_all("!<a[^>]+href=\"?'?([^ \"'>]+)\"?'?[^>]*>(.*?)</a>!is", $body_html_noindex, $m_urls); $index_link_list = null; $url_next = null; foreach ($m_urls[1] as $key => $url_l){ $link_type = check_link($url_host, $url_l); if ($link_type == 'out'){ if (!preg_match_all('@nofollow@i', $m_urls[0][$key], $matches, PREG_PATTERN_ORDER)){ $link_in_h++; } } elseif ($link_type == 'in'){ $index_link_list .= "<li>$url_l</li>"; @$url_p_next = parse_url($url_l); if (empty($url_next) && !preg_match('@mailto@', $url_next, $m) && !isset($url_p_next['fragment'])){ $url_next = $url_l; } } } try { if (!preg_match("@http@", $url_next, $m)){ if ($url_next[0] == '/') $url_next = 'http://'.$url_host.$url_next; else $url_next = 'http://'.$url_host.'/'.$url_next; } $get_url_2 = @file_get_contents($url_next); } catch (Exception $e){ $get_url_2 = ''; } $text = RemVerst($get_from_php, $get_url_2); $encode = get_codepage($get_from_php); $text_real = trim($text['text_1']); if ($encode == 'UTF-8'){ if (!empty($text_real)){ $text_real = iconv('UTF-8', 'CP1251//IGNORE', $text_real); } else $text_real = iconv('UTF-8', 'CP1251//IGNORE', $body_text_clear); } $count_word = substr_count($text_real, ' '); $count_char = strlen($text_real); if ($count_char > 3000){ $check_text_str = substr($text_real, 0, 3000); } else $check_text_str = $text_real; $text_unique_id = check_text($check_text_str, $url_host); $unique_check_f = true; while(!$unique_check_f){ $result_t = getResultPost($text_unique_id); if ($result_t == 'e'){ $unique_check_f = true; } else if ($result_t == 'w'){ sleep(3); } else if ($result_t > 0){ $unique_check_f = true; $unique_persent = $result_t; }; } //echo '<ul>'.$index_link_list.'</ul>'; preg_match_all('@keywords.*content=["\'](.*)["\']@i', $body_head, $matches, PREG_PATTERN_ORDER); $m_key = !empty($matches[1][0]) ? substr(htmlspecialchars($matches[1][0]), 0, 150) : '-'; if (!empty($m_key)) $m_key = preg_replace('@([а-я]),([а-я])@i', '$1, $2', $m_key); preg_match_all('@description.*content=["\'](.*)["\']@i', $body_head, $matches, PREG_PATTERN_ORDER); $m_desc = !empty($matches[1][0]) ? substr(htmlspecialchars($matches[1][0]), 0, 150) : '-'; $body_text_clear = stop_word_clear($body_text); $doc_y = $browser->Document->body->scrollHeight; $doc_x = $browser->Document->body->scrollWidth; $elements = $browser->Document->getElementsByTagName('a'); $link_i=0; $link_f=0; $link_count = $elements->length; $link_out=0; $link_in=0; $link_out_index=0; for ($i=0; $i<$elements->length; $i++){ if (empty($link_f)) $link_i++; $link = $elements[$i]; if (check_link($url_host, $link->href) == 'in') $link_in++; else { $link_out++; $no_index = no_index($link); if ($link->rel == 'nofollow' || $no_index) { $link_out_index++; } } $m = preg_match_all("@$url_f@", $link->href, $matches, PREG_PATTERN_ORDER); if (isset($matches[0][0])){ $no_index = no_index($link); if ($link->rel == 'nofollow' || $no_index) { $index_link = false; } else $index_link = true; $link_f=1; $xy = offset($link); try { $link_about = $link->nextSibling->nodeValue; } catch (Exception $e){ $link_about = ''; } $parent_link = $link->offsetParent; $parent_link_style = $parent_link->currentStyle; $link_style = $link->currentStyle; $color = $link_style->color; $font = $link_style->fontSize; $ankor = $link->innerHTML; $parent_bg = $parent_link_style->backgroundColor; if ($doc_y == 0) $doc_y = 1; if ($doc_x == 0) $doc_x = 1; $pos_x = round(($xy[0]/$doc_x)*100,2); $pos_y = round(($xy[1]/$doc_y)*100,2); if ($xy[0] > $doc_x) $x_err = '<br /><span style="font-size: 10px; color: #FF0000">(<b>Ошибка в верстке!!</b>)</span>'; else $x_err = null; if ($xy[1] > $doc_y) $y_err = '<br /><span style="font-size: 10px; color: #FF0000">(<b>Ошибка в верстке!</b>)</span>'; else $y_err = null; } } $link_out_index = $link_out - $link_out_index; ob_start(); $per_link = round(($link_i/$link_count)*100, 2); if ($link_out_index > 20) $rl_red = ' style="background: #FFCECE"'; else $rl_red = null; if ($pos_y > 90) $p_red = ' style="background: #FFCECE"'; else $p_red = null; if ($count_word < 600) $wc_red = ' style="background: #FFCECE"'; else $wc_red = null; if ($count_char < 5000) $ch_red = ' style="background: #FFCECE"'; else $ch_red = null; if (!$index_link){ $index_red = ' style="background: #FFCECE"'; } else $index_red = null; if ($color == '#FFFFFF' || $color == '#fff' || $color == '#FFF' || $color == '#ffffff') $c_red = ' style="background: #FFCECE"'; else $c_red = null; if ($link_in > 110) $li_red = ' style="background: #FFCECE"'; else $li_red = null; if ($per_link > 95) $per_red = ' style="background: #FFCECE"'; else $per_red = null; if ($link_in_h > 5) $rli_red = ' style="background: #FFCECE"'; else $rli_red = null; if ($unique_persent <= 50) $unique_red = ' style="background: #FFCECE"'; else $unique_red = null; echo " <tr $ch_f> <td>$url_i</td> <td><a target=\"_blank\" href=\"$url\">$url</a></td> <td style=\"font-size: 12px; width: 200px;\"> <p><b>TITLE:</b> $title</p> <p><b>Ключевые слова:</b> $m_key</p> <p><b>Описание:</b> $m_desc</p> </td> "; if ($link_f == 0) echo " <td><b>ссылка не найдена</b></td> <td>-</td> <td>-</td> <td>-</td> <td>-</td> <td>-</td> <td>-</td> "; else echo " <td$index_red>$ankor</td> <td>$link_about</td> <td$c_red><div style='background-color:$parent_bg'><span style=\"color:$color\">$color</span></div></td> <td>$font</td> <td>$pos_x% $x_err</td> <td$p_red>$pos_y% $y_err</td> <td$per_red>$link_i</td>"; echo " <td>".($yandex_direct?'Да':'Нет')." <td>".($google_adwords?'Да':'Нет')." <td>$social_net</td> <td>$teaser_system</td> <td>$popunder_system</td> <td$wc_red>$count_word</td> <td$ch_red>$count_char</td> <td>$link_count</td> <td$li_red>$link_in</td> <td>$link_out</td> <td$rl_red>$link_out_index</td> <td$rli_red>$link_in_h</td> <!--<td$unique_red>$unique_persent%</td>!--> </tr> "; ob_end_flush(); $url_i++; } $browser->Quit(); echo '</table>'; ?> </body>
Автор: Чернядьев Леонид Валерьевич