Dener misiniz hocam
function urlDondur($metin)
{
$url = '/(https?:\/\/|www\.)?(\S+)/i';
return preg_replace_callback($url, function($matches) {
$protocol = $matches[1] ? $matches[1] : '';
$url = $protocol . $matches[2];
return '<a href="' . $url . '" target="_blank" title="' . $url . '">' . $url . '</a>';
}, $metin);
}
bu oldu lakin hocam fakat metinide url olarak algıladı tüm hepsini url olarak algılıyor