Reading header information
| From: | jimmy | Date: | Thu, 29 Aug 2002 17:11:24 +0000 |
| Subject: | Reading header information | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-114530@lists.php.net to get a copy of this message | ||
What I'd like to do is get some of the information found when you do a
telent on port 80 like this below..
telnet www.hostname.com 80
Trying www.hostname.com...
Connected to.www.hostname.com
Escape character is '^]'.
HEAD / HTTP/1.0
HTTP/1.1 200 OK
Date: Thu, 29 Aug 2002 17:00:09 GMT
Server: Apache/1.3.26 (Darwin) PHP/4.2.2
Connection: close
Content-Type: text/html
Really what I'm trying to find is the server message (404, 200, etc.) on
a remote server from this line...
HTTP/1.1 200 OK
Is there anyway to access this through php?
thanks,
jimmy