$bodytext = preg_replace('#href="http://(.*)".*>#iU', 'href="http://www.xxx.de/redirect.php?url=\1" target="_blank">', $bodytext);