1‘, $text);
$text = @eregi_replace(‘([[:space:]()[{}])(www.[-a-zA-Z0-9@:%_+.~#?&//=]+)’, ‘12‘, $text);
$text = @eregi_replace(‘([_.0-9a-z-]+@([0-9a-z][0-9a-z-]+.)+[a-z]{2,3})’, ‘1‘, $text);
$regexp = “]*href=(“??)([^” >]*?)1[^>]*>(.*)“;
if(preg_match_all(“/$regexp/siU”, $text, $matches)) {
# $matches[2] = array of link addresses
# $matches[3] = array of link text – including HTML code
foreach ($matches[3] as $key=>$val) {
if ($val) {
$text = str_replace(“>” . $val . “<", ">” . substr($val,0,50) . “<", $text);
}
}
}
return $text;
}
$metin = "Metin dosyanız veya yazı http://banadersanlat.com";
$metin = otolink($metin);
echo "$metin";
?>