#16 a problem when parsing site

v1.0_(example)
open
nobody
None
1
2012-11-03
2012-11-03
IgorA100
No

Good day!

I have a problem when parsing site www.beeward.ru
Site is encoded "windows-1251"

function curl_gets_NEW($url){
$ch = curl_init();

$allUseragents = array(
    "Opera/9.23 (Windows NT 5.1; U; ru)",
    "Mozilla/16.0.1 (compatible; MSIE 5.12; Mac_PowerPC)",
    "Opera/8.54 (Windows NT 5.1; U; ru)",
    "Opera/9.21 (Windows NT 5.0; U; ru)",
    "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0; .NET CLR 2.0.50727)",
    "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; 3305; Wanadoo 6.1)",
);

$agent = $allUseragents[array_rand($allUseragents)];
curl_setopt_array($ch, array(
        CURLOPT_URL            => $url,
        CURLOPT_RETURNTRANSFER => 1,//return data as string
        CURLOPT_CONNECTTIMEOUT => 10,//timeout
        CURLOPT_TIMEOUT        => 100,
        CURLOPT_USERAGENT      => $agent,
        CURLOPT_HEADER           => 0,
        CURLOPT_NOPROGRESS       => 0,
        CURLOPT_FAILONERROR    => 0,
        CURLOPT_FOLLOWLOCATION => 0,
        CURLOPT_SSL_VERIFYPEER => 0,
    )
);

$data = curl_exec($ch);
curl_close($ch);

return $data;
}

        $url = 'http://beward.ru/goods/?dir1=1&dir2=21';
        $content = curl_gets_NEW($url);

--------- this is ok !

       $HTMLtext = str_get_html($content,true,true,'windows-1251');

--------this is problem
Instead of Russian letters emptiness
Use $HTMLtext = file_get_html($url,false,null,-1,-1,true,true,'windows-1251'); not solve the problem

Please help me.

With respect, Igor from Russia.

Discussion