Updated Question:
When using get_headers()
with the format
option to use named array keys (rather than numbered keys), how can I account for situations like the server using Content-type
rather than Content-Type
?
Original Question: PHP problem getting header of a file that has a colon in url
This url: http://string-theory.wdfiles.com/local--files/char%3Ajezebel/evangeline-lilly-picture-4a.jpg
Updated Answer:
If you can't guarantee that the server uses correct capitalization, you can use
array_change_key_case
to change the named keys.Old Answer:
You're going to have to expand on your question, because this works just perfectly:
PHP:
Output:
Output 2: (using URL given by OP)