Exactly what you need. The code is fully working and displays the desired playlist.
<? header('Content-Type: text/html; charset=utf-8'); $headers="Host: video-dom2.ru\r\nAccept: */*\r\nAccept-Language: ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4\r\nAccept-Charset: windows-1251,utf-8;q=0.7,*;q=0.3\r\nCache-Control: max-age=0\r\nAccept-Encoding: gzip,deflate,sdch\r\nUser-Agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.11 (KHTML, like Gecko) Ubuntu/11.10 Chromium/17.0.963.79 Chrome/17.0.963.79 Safari/535.11\r\n"; $sock=fsockopen('video-dom2.ru', 80); $query="GET /onlinetv/ HTTP/1.0\r\n".$headers."\r\n\r\n"; fwrite($sock, $query); $res=fread($sock, 2048); fclose($sock); preg_match_all('/set-cookie: (.+?)[;\n\r]/i', $res, $arr); $sock=fsockopen('video-dom2.ru', 80); $query="GET /onlinetv/pl_dom2.php HTTP/1.0\r\n".$headers."Referer: http://video-dom2/onlinetv/player/player.swf\r\nCookie: "; foreach ($arr[1] as $k=>$v){ $query.= $v.'; '; }; $query=substr($query, 0, strlen($query)-2); $query.="\r\n\r\n"; fwrite($sock, $query); $res=''; while (!feof($sock)){ $res.=fread($sock, 512); }; $sp=explode("\r\n\r\n", $res); echo htmlspecialchars(gunzip($sp[1]))."\r\n"; function gunzip($zipped) { $offset = 0; if (substr($zipped,0,2) == "\x1f\x8b") $offset = 2; if (substr($zipped,$offset,1) == "\x08") { return gzinflate(substr($zipped, $offset + 8)); } return "Unknown Format"; } ?>