kod bir metin içinde link varsa onu href olarak algılıyor http varsa calisiyor fakat www.siteadi.com olarakda algılamasını istiyorum
<?php
function urlDondur($metin)
{
$url = '/(http|https|ftp|ftps)\:\/\/[a-zA-Z0-9\-\.]+\.[a-zA-Z]{3,4}(\/\S*)?/';
return preg_replace($url, '<a href="$0" target="_blank" title="$0">$0</a>', $metin);
} ?>