开发者

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);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜