$data = "HTTP/1.1 200 OK
Date: Thu, 22 Jan 2015 23:56:03 GMT
Server: Apache/2.2.10 (Fedora)
Last-Modified: Mon, 31 Oct 2011 02:46:01 GMT
Content-Length: 3210
Connection: close
Content-Type: text/html

Hello world!";

preg_match('/\A.*?(?=\s*^\s*$)/sm', $data, $regM);

echo $regM['0'];

Вернуться к статье о скрипте