Hmm, if you don't have magic quotes turned on (and can't because
you don't "own" the server) you can always use addslashes() and
stripslashes(). This is the very definition of tedious, however, so
I recommend you get magic quotes turned on if you can.
As far as your code, I have some difficulty understanding two
things:
(1) $header = str_replace("\"",""",$header);
It sure looks to me like that second argument is three consecutive
double-quotes (and it cut-and-pastes like that, too.) This should
provoke some kind of parsing error. Did you perhaps mean to say
" ' " instead?
(2) $text = ($text);
What is this line supposed to accomplish?