Audio/video stream recording forums

Attention Visitor:
You may have to register or log in before you can post:
  • Click the register link to sign up.
  • Registered members please fill in the form below and click the "Log in" button.
To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Audio/video stream recording forums > Streaming media recording forum > Video stream recording
Register FAQ Members List Calendar Mark Forums Read

Reply Post New Thread
 
Thread Tools Display Modes
  #1  
Old 07-11-2016, 08:36 PM
ozzier ozzier is offline
Junior Member
 
Join Date: Jul 2016
Posts: 1
ozzier is on a distinguished road
Default

M3U8 via PHP (get_file_contents) vs. web browser gives different session variables


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

Last edited by ozzier : 07-11-2016 at 08:40 PM. Reason: Updated
Reply With Quote
Reply Post New Thread
Tags: , , ,



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -6. The time now is 01:42 PM.


Powered by All-streaming-media.com; 2006-2011
vB forum hacked with Zoints add-ons