note 38284 deleted from ref.http by nlopess
| From: | nlopess@php.net | Date: | Mon, 15 Dec 2003 13:43:04 +0000 |
| Subject: | note 38284 deleted from ref.http by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-61979@lists.php.net to get a copy of this message | ||
Note Submitter: anbolb@boltblue.com
----
You can easily grab the response header from a server like so:
$connection = fsockopen ('www.somewhere.com', 80);
fputs ($connection, "GET /index.html HTTP/1.0\n\n");
while (($response = fgets ($connection)) !== "\n")
$header .= $response;
fclose ($connection);
Although a Windows server might return "\r\n" (which is probably closer to the official
HTTP specification)