Well, yes. You're telling it to output the whole text file. That's what the loop does: keeps reading lines and outputting them for as long as there are still lines in the file to read.
$handle = fopen("http://ws.audioscrobbler.com/txt/recent/wbsmith89", "r");
$buffer = fgets($handle, 4096);
echo $buffer;
fclose($handle);
This is why cut-and-paste programming usually doesn't work.