note 79094 deleted from function.get-headers by danbrown
| From: | danbrown@php.net | Date: | Mon, 09 Jan 2012 19:59:24 +0000 |
| Subject: | note 79094 deleted from function.get-headers by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-185496@lists.php.net to get a copy of this message | ||
Note Submitter: PieterMarchand at telenet dot be
----
Hello
just a tiny mod gives a cleaner solution
$key = array_shift(explode(':',$header));
$key = array_shift(explode(': ',$header));
notice the space after the colon.
Can be important if you want to modify this function in order to check if a url is valid. On
response code 301 or 302 you need the new location. This new location happens to have a colon in it,
the clock also has a few colons in it. Neither of them appear complete. With this tiny mod they do.
greetz,
Pieter