(.*?)<\/title>/si', $html, $title_match);
$page_title = isset($title_match[1]) ? trim($title_match[1]) : $subdomain;
preg_match('/]+src=["\']([^"\']+)["\'][^>]*>/si', $html, $img_match);
$page_image = '';
if (isset($img_match[1])) {
$img_src = $img_match[1];
if (strpos($img_src, 'http') === false) {
$page_image = $base_url . '/' . ltrim($img_src, '/');
} else {
$page_image = $img_src;
}
}
preg_match('/]+name=["\']description["\'][^>]+content=["\']([^"\']+)["\'][^>]*>/si', $html, $desc_match);
$page_desc = isset($desc_match[1]) ? trim($desc_match[1]) : $page_title;
$seo_tags = '
' . ($page_image ? '' : '') . '
' . ($page_image ? '' : '') . '
';
if (stripos($html, '', $seo_tags . '', $html);
echo $html;
} else {
echo '