Premature end script headers

I attempted to implement this script from:

I seemed to get everything right…but when it came to actually using it, i got an internal server error. I looked into it in Control Panel, and found that it was a Premature end of script headers…

Does anyone have an idea on how to fix this???


To be a little more detailed, I am using the script near the bottom, not the one near the middle!