Here is the link , there is a player on the page. How to get a playlist?

PS Who will load the playlist specified in the code of this page - refresh the page, I bet, the second time you will not see it, but the player itself somehow still gets the playlist, the actual question is how?

    3 answers 3

    Here tore the playlist with the coding you will understand. Link

    • The fact is that the playlist is updated there every day, and I need to parse it, and the task is how to get it when I feel like it, and not for good luck ... - andrewshka
    • firefox plugin FireBug - javero
    • Chuuut a little more detail you can, pozhaluysta? (: - andrewshka 9:09 pm
    • one
      you download FireBug plugin, restart FireFox. click on the bug on the top right .. poking the Network tab, then Everything, then not clearing .. go to the video-dom2.ru/onlinetv page there you are looking for the file you need .. click the plus sign to expand the file info - javero
    • We talked about [playlist file] [1], and there FireBug does not help, because after updating the page - zero movements [1]: video-dom2.ru/onlinetv/pl_dom2.php - Deonis

    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"; } ?> 
    • Powerful answer, be sure to try. Thank!!! - andrewshka 10:39 pm
    • Damn (((I forgot about cookies completely. If you turn off cookies, the player does not load the playlist. And my version does not transmit cookies, therefore such a short length is 20 bytes: there probably is something like "Turn on cookies". - ReinRaus
    • Corrected the answer. - ReinRaus
    • Strange, I just have a blank page, i.e. nothing at all. - andrewshka
    • Strange. I just copied the code from my answer into a new php file and saw the playlist. Probably you should try as well. If you paste this code in the middle of another code, an error will occur because of the header. - ReinRaus

    I checked it several times - it loads, but already with a delay of a second. But the link http://video-dom2.ru/onlinetv/pl_dom2.php - there is nothing, that is absolutely nothing, even if you look at the source code. By the way, it doesn’t matter to the player - whether a playlist is displayed or not, for it the path to the playlist itself is registered))

    • Just the same player the playlist is important, otherwise at each upload, there is no place to take data from, and he takes it from somewhere ... That's the problem. - andrewshka
    • Probably too late and you are tired))) Read carefully, I wrote that the player is important path playlist, to the file in which the playlist, and it is displayed or not - the player does not care. - Deonis
    • Maybe (: Yes, the playlist file is in place, maybe the player doesn’t care, but it doesn’t contain any data, how does it list the episodes? The file displays the entire playlist for a while, but not for some time ... Here and the question of where the player loads the list of series if there is no data in the playlist? - andrewshka
    • Dynamically it is loaded there. And with what the bug "that is - that is not" is connected - I will not say that. - Deonis