Answer the question
In order to leave comments, you need to log in
Curl returns "ï"¿, how to fix?
It is clear that this is utf-8 with a bom, but only these three characters come in, for some reason the content is not loaded.
Curl I have
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, "http://site.ru/page.html");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)');
curl_setopt($curl, CURLOPT_FAILONERROR, true);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 10);
$content = curl_exec($curl);
curl_close($curl);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question