* Thus wrote Mike Migurski ([EMAIL PROTECTED]): > >Is there a way to get fsockopen to suppress the header information it > >returns. I have no use for the crap, have no idea how to use a regexp to > >get it out of there (nor does anyone on this list it would seem either). > > preg_match('/(<!DOCTYPE.+<\/html>)/ms', $http_response, $html) > > ...puts it into $html[1]. Adjust to suit your local standards-compliance > practices. You can also look for everything after the first instance of > "\n\n".
Thats assuming that the person used the <doctype><html> for the first item. what bout extra space, SSI, etc... Yeah I know that a proper html doc should have that doctype as the first line, but most people dont even know what the doctype is used for if the even know that one exists. best to look for the first empty line, that seperates the headers and content. Curt -- "I used to think I was indecisive, but now I'm not so sure." -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php