Fr0zEn Posted November 3, 2015 Share Posted November 3, 2015 I'm trying to get file content to extract m3u8 link of this page: http://tv24.vn/livetv/vtv1.html It requires to login; (they use jlogin method) I give here my login info for you to test user: h2132704@trbvm.com pass: 12345678 <?php $return = file_get_contents("http://h2132704@trbvm.com:12345678@tv24.vn/livetv/vtv1.html"); preg_match('/file: \"(.*?)\"/', $return, $m3u8); $hls=str_replace("http","hlsvariant://http",$m3u8[1]); echo "Starting livestreamer...\n\n"; echo passthru("C:\livestreamer\livestreamer \"$hls\" 496p -o C:\livestreamer\Test.ts"); echo "Done.\n"; ?> Any solution ? Sorry for my bad English Quote Link to comment https://forums.phpfreaks.com/topic/299027-need-help-to-get-contents-with-jlogin-method/ Share on other sites More sharing options...
QuickOldCar Posted November 3, 2015 Share Posted November 3, 2015 They use javascript to load player and also inject the video source. PHP does not parse javascript. You can manually get them using dom inspector though. <script> jwplayer("player-embed").setup({ height: '506', width: 'auto', sources: [ { file: "http://vtsstr4.sctv.vn/f1betalive2/c043_mb.smil/playlist.m3u8?t=c990873dd900fa5da3b30fb01bbd2f545d4648acf339e3a8eb18a487717a6a7b&e=1446519291" } ], autostart: 'true' }); </script> Quote Link to comment https://forums.phpfreaks.com/topic/299027-need-help-to-get-contents-with-jlogin-method/#findComment-1525270 Share on other sites More sharing options...
Fr0zEn Posted November 3, 2015 Author Share Posted November 3, 2015 They use javascript to load player and also inject the video source. PHP does not parse javascript. You can manually get them using dom inspector though. <script> jwplayer("player-embed").setup({ height: '506', width: 'auto', sources: [ { file: "http://vtsstr4.sctv.vn/f1betalive2/c043_mb.smil/playlist.m3u8?t=c990873dd900fa5da3b30fb01bbd2f545d4648acf339e3a8eb18a487717a6a7b&e=1446519291" } ], autostart: 'true' }); </script> Can I use Javascript to get the latest m3u8 link at the specific time ? I use livestreamer to capture video Quote Link to comment https://forums.phpfreaks.com/topic/299027-need-help-to-get-contents-with-jlogin-method/#findComment-1525277 Share on other sites More sharing options...
QuickOldCar Posted November 3, 2015 Share Posted November 3, 2015 Basically they do this so people can't copy their source files, should ask them permission and they give you some sort of access. Nobody here should assist in taking others content. Quote Link to comment https://forums.phpfreaks.com/topic/299027-need-help-to-get-contents-with-jlogin-method/#findComment-1525278 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.