I dispatch a JSP from my php script with fsockopen and fputs. I receive the jsp's output with fgets into a string $rstr. Fine, I have a complete html page with a header, some imbedded javascript. It looks like:
HTTP/1.1 200 OK
Date: Tue, 02 Apr 2002 20:30:21 GMT
Server: Apache/1.3.23 (Unix) PHP/4.1.1
(blah blah blah) Connection: close
html, javascript, whatever
I want to "run" this html, and I do it by
echo $rstr;
This works, except that the header (HTTP/1.1 etc.) is also being echoed, and I only want the browser to show the html! i.s. what is between the and tags. Does anyone have any idea why this is happening, or how I can suppress the header, or a better way to get my browser to run this string?
Thanks,
Rich