I stumbled upon the wrong result of get_headers()
method.
URL for testing: http://www.zakon.hr/z/199/Zakon-o-elektroni%C4%8Dkoj-trgovini
Here's simple curl request to that URL:
As you can see on screenshot there's successful response with 200 OK code.
But if I using get_headers()
for the same URL I'm getting anothere result:
var_dump(get_headers('http://www.zakon.hr/z/199/Zakon-o-elektroničkoj-trgovini'));
array(4) {
[0]=>
string(24) "HTTP/1.0 400 Bad request"
[1]=>
string(23) "Cache-Control: no-cache"
[2]=>
string(17) "Connection: close"
[3]=>
string(23) "Content-Type: text/html"
}
Why is that?