get curl respone encoding
I'm using cURL to retrieve a webpage.
What's the easiest way to get encoding of 开发者_如何学Gothe page? Of course I can parse response header to get charset, but I wonder if there is a better way.Imo the most efficient way in this case will be:
$sContentType = curl_getinfo($ch, CURLINFO_CONTENT_TYPE);
精彩评论