Re: Test links?

From: Date: Mon, 02 Dec 2002 18:06:07 +0000
Subject: Re: Test links?
References: 1 2 3 4 5 6 7  Groups: php.general 
Request: Send a blank email to php-general+get-126752@lists.php.net to get a copy of this message
DL Neil wrote:
Beth, I noticed this reference to "$http_response_header" and straightaway quizzed the manual, only to find that the only references to it (eg file open) lead nowhere. Have gone through a few other pages, looking to see if I might happen upon some detail, but failed. Sadly you don't refer to it in the code snippet provided (below). Any code I've attempted blindly has failed/reported errors. Please point me in the right direction (otherwise I guess it'll be time to download the new v4.3.0-RC and risk the bleeding edge - which according to the manual does something different anyway...) Yeah, it's not mentioned anywhere else, I just completely guessed at what to do with this and got lucky on the first attempt, but if you do a ...
<?php print_r($http_response_header); ?> ... you get tons of junk like: Array ( [0] => HTTP/1.1 200 OK [1] => Date: Mon, 02 Dec 2002 17:54:47 GMT [2] => Server: Apache/1.3.27 (Unix) PHP/4.2.3 mod_perl/1.27 mod_gzip/1.3.19.1a [3] => Cache-Control: max-age=900, public, must-revalidate, max-age=900 [4] => Expires: Mon, 02 Dec 2002 18:09:47 GMT [5] => Last-Modified: Mon, 02 Dec 2002 17:51:56 GMT [6] => ETag: "28de7-cfa4-3deb9dbc" [7] => Accept-Ranges: bytes [8] => Content-Length: 53156 [9] => Connection: close [10] => Content-Type: text/html; charset=iso-8859-1 ) When I first programmed the little function for Rob, I used it to check for a 200 status, but it turns out that fopen completely fails UNLESS it gets that 200, so it wasn't necessary. Beth Gore -- http://bethanoia.dyndns.org

« previous php.general (#126752) next »