Hi all,
First of all, great forum - with a wealth of knowledge!
I'm trying to scrape a website (
www.glturk.com), but I seem to get different session ID's when I run my PHP code. I don't understand why. Here's the situation -
If I run this link in a browser:
Code:
http://www.glturk.com/ajax.aspx?stream=live&type=free&ppoint=ATVTurkiye_LR
I get this result:
Code:
http://38.117.88.249:7777/ATVTurkiye_LR.m3u8?user=sglsspjmii55i2ujv455pmjbhhbo&session=347ce743c69300c69e4f1155454b43d1b56122a572ee475767b255c5519ac6c34325d5fe85d05767c79ad47051272efa47becaa87501a89d6529d438c300148f
The above link works perfectly... But, the sessions obviously keep changing daily, so will only work for a day... So, I want to write a PHP file to get the current link/session info.
So... I wrote a simple script to retrieve the exact same link, and the link returned m3u8 link doesn't work in this instance, even though the link is almost identical:
Code:
<?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 of the above code is:
Code:
http://38.117.88.249:7777/ATVTurkiye_LR.m3u8?user=sglspoqmpdi2tltn0lynorytlnvi&session=08e5fd64dca2f17d9e4f1155454b43d136fa14cb989a57687b29865e85d60962253ac665a78595d7c5529895b22236c2f32018226b4a15e9b8327f16597d3505
The above link does not work for some reason.
I noticed theres an ASP.NET Session variable in the header when requesting this link, I wonder if that has anything to do with it?
Any advise from anyone would be greatly appreciated, thank you in advance
