RE: [PHP] fsockopen
| From: | Mike Migurski | Date: | Tue, 22 Jul 2003 20:22:28 +0000 |
| Subject: | RE: [PHP] fsockopen | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-156321@lists.php.net to get a copy of this message | ||
>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".
---------------------------------------------------------------------
michal migurski- contact info and pgp key:
sf/ca http://mike.teczno.com/contact.html