I'm in the process of rewriting a Perl-based web crawler I wrote nearly 8 years ago in PHP. I used the quite handy URI::URL module in perl to do things like:
$sourceUrl = '/blah.html';
$baseHost = 'http://www.example.com';
my $url = URI::URL->new($sourceUrl, $baseHost);
return $url->abs;
returns: 'http://www.example.com/blah.html'
the parse_url function in PHP is quite handy, but is there something more robust? Specifically something that will give the above functionality?