That's because you havent thought through what you are doing.
- $name has not been initialised.
- Even if it has, what good does rand() do?
One way would be to place the filenames into an array:
<html>
<?php
$name = array(
"nbwo.ram",
"aika.ram",
"kilo.ram",
"nhaw.ram"
);
?>
<embed src="<?php echo $name[rand(0, count($name) - 1)]; ?>" type="audio/x-pn-realaudio-plugin" WIDTH=0 HEIGHT=0 pluginspage="http://www.real.com/player/index.html?src=000629realhome" autostart="true" name="RealPlayer"></embed>
</html>