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!