I made some improvement to this code :
first I add the trim function to get ride of line feed or spaces at the end of the links
:
$url = trim($url); #before $url = explode(" ", $url);
then i add option to view the size of the files :
$pos1 = strpos($rsurls,">| ");
$pos2 = strpos($rsurls," KB");
echo substr($rsurls, $pos1+3, $pos2-$pos1)." ";