Is the html generated by your scripts, or are you grabbing from somewhere else?
if it's the first look at the output buffering func like [man]ob_start[/man] and [man]ob_get_clean[/man] or if you're sucking someone elses lolly then [man]file_get_contents[/man] might do ya.