practicamente lo que hace este code es reemplazar las palabras que comiencen con www. o http:// y las vuelve enlaces, las palabras que tengan @ las vuelve a un enlace mailto:

Codigo:

<?php
function url($text){
        $text = html_entity_decode($text);
        $text = " ".$text;
        $text = eregi_replace('(((f|ht){1}tp://)[-a-zA-Z0-9@:%_+.~#?&//=]+)',
                '<a href="\1">\1</a>', $text);
        $text = eregi_replace('(((f|ht){1}tps://)[-a-zA-Z0-9@:%_+.~#?&//=]+)',
                '<a href="\1">\1</a>', $text);
        $text = eregi_replace('([[:space:]()[{}])(www.[-a-zA-Z0-9@:%_+.~#?&//=]+)',
        '\1<a href="http://\2">\2</a>', $text);
        $text = eregi_replace('([_.0-9a-z-]+@([0-9a-z][0-9a-z-]+.)+[a-z]{2,3})',
        '<a href="mailto:\1">\1</a>', $text);
        return $text;
} 

$ejemplo="visiten www.funny2be.com.ar y disfruten de la web xD también escríbanme a mi correo (mentira, es ficticio xD) funny2be@hotmail.com";
// este es un texto de prueba 

$texto_final=url($ejemplo);
//aca llamamos la funcion y ahcemos el link par apoder mostrarlo 

echo $texto_final;
//mostramos el texto editado
?>