Mailinglisten-Archive |
Hallo andre,
> <?php
> function callbackEnc($matches) {
> $code = $matches[1]."<a target=\"_blank\"
> href=\"/_rd/goto.html?url=";
> $param = base64_encode($matches[2].$matches[3]);
> $result =
> $code.$param."\">".$matches[2].$matches[3]."</a>".$matches[4];
> return $result;
> }
>
> $subject = "http://scroogie.de/";
> $pattern =
> '#(^|[^\"=]{1})(http://|https://|ftp://|mailto:|news:)([^\s<>]
> +)([\s\n<>]|$)#sm';
> $msg = preg_replace_callback($pattern, 'callbackEnc', $subject);
> echo $msg;
> ?>
Ich vestehe den code nicht 100% aber er funzt.
Aller besten dank dafür!
Lg
michael
php::bar PHP Wiki - Listenarchive