At 16:46 28.02.2003, Diana Castillo spoke out and said:
--------------------[snip]--------------------
>is there any predefined procedure to strip http headers from a response?
--------------------[snip]--------------------
A valid HTTP response is a MIME message comprised of two parts - the header
block, and the data block. Both blocks are separated by a single empty newline.
You can easily split them using something like this (untested):
list(header, body) = preg_split("/(\r\n|\n\r|\r|\n){2,2}/s", $message, 2);
This should catch all possible variations of newlines. The correct newline
sequence afaik is "\r\n".
--
>O Ernest E. Vogelsinger
(\) ICQ #13394035
^ http://www.vogelsinger.at/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php