Q:

PHP Script Parsing Files Incorrectly

I am not exactly sure what the problem is, but I have a PHP script which should be downloading and displaying specified web pages.  However, certain pages create a download dialog in the browser rather than displaying the page (but the downloaded file is still the correct HTML).  This only happens for some websites but I am not sure what makes the difference. 
I have messed around with the content type headers and I do not think this is the problem, but could this be a client-side problem somehow?  I do not know where to look to figure out how to debug this, so I would appreciate any help that points me in the right direction. 
Thank you for your time. 

A:

Install firebug, and examine response headers to figure out what's being sent, probably Content-Type or Content-Disposition header.