Re: Reading header information

From: Date: Sat, 31 Aug 2002 01:17:05 +0000
Subject: Re: Reading header information
Groups: php.general 
Request: Send a blank email to php-general+get-114740@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? In the old days you'd have to do http://php.net/fsockopen Now there's some new-fangled function to do the header part for you... Can't remember the name, but it's in the manual somewhere... Probably with the "file" stuff. -- Like Music? http://l-i-e.com/artists.htm

« previous php.general (#114740) next »