In this code:

$String="Hi how are you http://mypage.com fine thanks http://youpage.com";

How can I replace all sites in this var to any string, for example (STAR)

I mean I want to let:
$String="Hi how are you STAR fine thanks STAR";


---
Like:
replace
(URL)http://site.com(/url)
To
<A href=http://site.com>http://site.com</A>

in this forum