<?php function content_nofollow($log_content, $domain) { preg_match_all('/href="(.*?)" rel="external nofollow" /', $log_content, $matches); if ($matches) { foreach ($matches[1] as $val) { if (strpos($val, $domain) === false) { $log_content = str_replace('href="' . $val . '" rel="external nofollow" rel="external nofollow" ', 'href="' . $val . '" rel="external nofollow" rel="external nofollow" rel="external nofollow" ', $log_content); } } } preg_match_all('/src="(.*?)"/', $log_content, $matches); if ($matches) { foreach ($matches[1] as $val) { if (strpos($val, $domain) === false) { $log_content = str_replace('src="' . $val . '"', 'src="' . $val . '" rel="external nofollow"', $log_content); } } } return $log_content; }?>
<?php echo content_nofollow($log_content,BLOG_URL);?>
<?php error_reporting(0); $url = $_GET['url']; header("Location:".$url); ?>
<?php function content_nofollow($log_content, $domain){ preg_match_all('/href="(.*?)"/', $log_content, $matches); if ($matches) { foreach ($matches[1] as $val) { if (strpos($val, $domain) === false) { $log_content = str_replace('href="'.$val.'"', 'href="'.BLOG_URL.'redirect.php/?url='.$val.'"', $log_content); }}} preg_match_all('/src="(.*?)"/', $log_content, $matches); if ($matches) { foreach ($matches[1] as $val) { if (strpos($val, $domain) === false) { $log_content = str_replace('src="' . $val . '"', 'src="' . $val . '" rel="external nofollow"', $log_content); }}} return $log_content; }?>
<?php echo content_nofollow($log_content,BLOG_URL);?>
站点统计
留言咨询