Retrieving M3U8 via PHP vs. via Website gives different session variables

不羁岁月 提交于 2019-12-12 02:25:01

问题


I'm trying to scrape a website (www.glturk.com). When I run the below link via a browser:

http://www.glturk.com/ajax.aspx?stream=live&type=free&ppoint=ATVTurkiye_LR

I get the following response:

http://38.117.88.248:7777/ATVTurkiye_LR.m3u8?user=sglsxxdewfiduaqygnbfnqwcuc55&session=e0e8f5e6dbfb83be9e4f1155454b43d14130b7e79528a6fbe8dcb832c9f2cef0fbecdaf0092c93ab9826978c8d46626c20ba4293a32569e6e7cfbbd9d61c69ad

The above M3U8 link works perfectly in that instance.

But, if I try to replicate this via a PHP file, I get a very similar result, but that m3u8 link does not work?!

<?php
   $channelURL= 'http://www.glturk.com/ajax.aspx?stream=live&type=free&ppoint=ATVTurkiye_LR';
   $actualLink = file_get_contents($channelURL, TRUE);
   echo $actualLink;
?>

The result I get is:

http://38.117.88.249:7777/ATVTurkiye_LR.m3u8?user=sglspoqmpdi2tltn0lynorytlnvi&session=08e5fd64dca2f17d9e4f1155454b43d136fa14cb989a57687b29865e85d60962253ac665a78595d7c5529895b22236c2f32018226b4a15e9b8327f16597d3505

This m3u8 does not work though, I can't understand why.

Working (via direct link through browser):

http://38.117.88.248:7777/ATVTurkiye_LR.m3u8?user=sglsxxdewfiduaqygnbfnqwcuc55&session=e0e8f5e6dbfb83be9e4f1155454b43d14130b7e79528a6fbe8dcb832c9f2cef0fbecdaf0092c93ab9826978c8d46626c20ba4293a32569e6e7cfbbd9d61c69ad

Not Working (via PHP):

http://38.117.88.249:7777/ATVTurkiye_LR.m3u8?user=sglspoqmpdi2tltn0lynorytlnvi&session=08e5fd64dca2f17d9e4f1155454b43d136fa14cb989a57687b29865e85d60962253ac665a78595d7c5529895b22236c2f32018226b4a15e9b8327f16597d3505

Any advise would be appreciated :) Thank you!

来源:https://stackoverflow.com/questions/38214758/retrieving-m3u8-via-php-vs-via-website-gives-different-session-variables

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!