Добавлен для пробы curl-helper.php, работоющий с библиотекой cURL
This commit is contained in:
@ -29,11 +29,12 @@ class ContingentParser
|
||||
$dom = new \DOMDocument(
|
||||
// encoding: "UTF-8"
|
||||
);
|
||||
if (mb_detect_encoding($html, 'UTF-8, windows-1251') != "UTF-8") {
|
||||
$encoding = mb_detect_encoding($html, 'UTF-8, windows-1251');
|
||||
if ($encoding != "UTF-8") {
|
||||
$html = mb_convert_encoding(
|
||||
$html,
|
||||
'UTF-8',
|
||||
mb_detect_encoding($html, 'UTF-8, windows-1251')
|
||||
$encoding
|
||||
);
|
||||
$html = str_replace('windows-1251','utf-8', $html);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user