Do a var_dump($message); and paste the results here - that way we can see exactly what kind of 'message' you're working with.
Also note that your pattern could be shortened a bit to:
preg_match_all("@(?:https?://|www\.)[a-z0-9.-]+\.[a-z]{2,3}[/a-z0-9&.?=+-]*@i", $message, $url);
The regexp seems fine to me as well. Here was my test code:
$message = 'This URL: http://phpbuilder.com/board/newthread.php?do=newthread&f=10 works!';
preg_match_all("@(?:https?://|www\.)[a-z0-9.-]+\.[a-z]{2,3}[/a-z0-9&.?=+-]*@i", $message, $url);
print_r($url);
and the output:
Array
(
[0] => Array
(
[0] => http://phpbuilder.com/board/newthread.php?do=newthread&f=10
)
)