PHP strpos() cannot find string in curl_getinfo() result [closed]

1 day ago 1
ARTICLE AD BOX

This is a part of my code:

$content_type = curl_getinfo($ch, CURLINFO_CONTENT_TYPE); fwrite($file, $content_type); if(strpos($content_type, "text/html") === false) { // do some things }

... and the code does "some things" as if $content_type does not contain "text/html".

But it does! I see it in the $file - it's "content type: text/html; charset=utf-8;"

Please advice how could it be?

Read Entire Article