I think someone edited my post because it looked fine when I posted it first, anyway heres a piece of the output which is wrong -
..............</y T@z="996666">.......................... .......<f z wE V I C E \ T C P I P _ { 7 7 7 7 7 7 7 7 - 7 7 7 7 - 7 7 7 7 - 7 7 7 7 - 7 7 7 7 7 7 7 7 7 7 7 7 } lor="330000">.......
I should be getting all dots, but I seem to be getting glitches like the above in my output - is this a memory issue?
Your code looks fine to me, are you sure this problem isn't on the browser side? I'd be especially suspicious of the browser if your script is hosted on a non-windows server, as the gibberish looks very windows-like.
We're not surrounded, we're in a target-rich environment!