Re: fsockopen
| From: | Curt Zirzow | Date: | Tue, 22 Jul 2003 21:16:03 +0000 |
| Subject: | Re: fsockopen | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-156337@lists.php.net to get a copy of this message | ||
* Thus wrote Mike Migurski (mike@saturn5.com):
> >> 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...
>
> SSI's wouldn't be output on port 80, and anything before the doctype is
> essentially junk anyway. Like I said, suit to taste or just pull from
> after the first "\n\n" -- no regexp needed in that case.
My bad, i had overlooked that ssi's get expanded before it gets to the
client.
Thanks,
Curt
--
"I used to think I was indecisive, but now I'm not so sure."