right you can deploy the filters you want for the various conditions. So in this example I assume you want to filter by the page html. Assuming the $urls_array var holds the urls:
$urls_array = array (
0 => "http//www.example.com/some/some.html",
2 => "www.example.com/some/some.html",
3 => "//example.com/some/some.html",
4 => "http://example.com/some/some.html",
5 => "some.html",
);
echo '<pre>';
var_dump($urls_array);
echo '</pre>';
foreach($urls_array as $key => $value) {
$tmp_array = explode('/', $value);
if( is_array($tmp_array) && count($tmp_array) ) {
$urls_array[$key] = 'http://www.example.com/some/' . $tmp_array[count($tmp_array)-1];
}
}
echo '<pre>';
var_dump($urls_array);
echo '</pre>';
so the output should now show the urls with the domain and path included.