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 audio and video online. Audio and video downloads. > Playing online streaming in media players
Register FAQ Members List Calendar Mark Forums Read

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 05-01-2016, 04:07 AM
Kerem Kerem is offline
Junior Member
 
Join Date: May 2016
Posts: 8
Kerem is on a distinguished road
Question

[php curl] m3u8 works on localhost but nor work on server


I've got m3u8 link for oen of the radio streams by using Curl in PHP:

HTML Code:
<?php 
 $url = "http://karwan.tv/";
 function get_dataa($url) {
 $ch = curl_init();
 $timeout = 5;
 curl_setopt($ch, CURLOPT_URL, $url);
 curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0)");
 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
 curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,false);
 curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,false);
 curl_setopt($ch, CURLOPT_MAXREDIRS, 10);
 curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
 curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
 $data = curl_exec($ch);
 curl_close($ch);
 return $data;
}
 $variableee = get_dataa('http://karwan.tv/live/radio/radio-dewran.php');
$res = explode("\n",$variableee);
$strr = $res[12];
echo   $str  = substr( $strr,8 ,184);
?>
And I't works like a charm on localhost.
But when I upload this file to my website, the generated link will not work. When I opened the link it shows me this error on a white page:
"Forbidden."

Generated output link:
http://radio.karwan.me/karwan.tv/rad...1pbnV0ZXM9MjA=


What would be the solution for this problem?
Reply With Quote
 
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 04:17 AM.


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