You can't expect sticking arbitrary HTML together to just work - HTML has a well defined structure which means that things need to appear in the right order.
Therefore simply slapping your own header on top of someone else's HTML is guaranteed to fail.
Likewise, adding a footer should fail for the same reason.
The only way of actually doing this is to parse the HTML and insert your content at appropriate places; this is extremely nontrivial.
You may wish to ask the owner of the site for a machine readable feed instead. Syndicating someone else's content without their permission and/or cooperating is guaranteed to lead to disaster, both from a technical and legal standpoint.
Mark