(.*)<\/title>/si", $to_print, $matches)) $title = $matches[1]; else $title = "[open][subvertising session]"; if(preg_match("/(.*)<\/body>/si", $to_print, $matches)) $inner_body = $matches[1]; else $inner_body = false; $inner_body = preg_replace("/.*/siU", "", $inner_body); $inner_body = preg_replace("/(.*)<\/a>/siU", "\\0 [\\1]", $inner_body); ?> <? echo $title ?>