Why not just build a array of links eveytime a new link is added or removed. Then just include the file that holds the $array and then...
$keys = array_rand ( $array, 3 );
echo $array[$keys[0]] . "\r\n";
echo $array[$keys[1]] . "\r\n";
echo $array[$keys[2]] . "\r\n";
A include() is faster than calling file() and then having to process it!
abc