Jump to content
Forum Windows-az.com

PHP cURL Problemi


AliZairov
 Share

Recommended Posts

Salam. AzerBox web sehifesini hazırlamışam. Tekcə player cURL jsondan linki çəkəndə token problemi olur. Bunun üçün bir çarə varmı.

$url = "http://www.myvideo.az/ios/android.php?chan=&chan=aztv";
$ct = curl_init();
curl_setopt($ct, CURLOPT_URL, $url);
curl_setopt($ct, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ct, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
$response = curl_exec($ct);
$source = json_decode($response, true);
echo $source["st"];
Link to comment
Share on other sites

  • 5 months later...

 

Salam. AzerBox web sehifesini hazırlamışam. Tekcə player cURL jsondan linki çəkəndə token problemi olur. Bunun üçün bir çarə varmı.

$url = "http://www.myvideo.az/ios/android.php?chan=&chan=aztv";
$ct = curl_init();
curl_setopt($ct, CURLOPT_URL, $url);
curl_setopt($ct, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ct, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
$response = curl_exec($ct);
$source = json_decode($response, true);
echo $source["st"];

 

belede ede bilersen.

$tv='lider';

$page = file_get_contents('http://www.myvideo.az/?act=dvr&chan='.$tv);
preg_match("#dvrServer':'(.*)'#sU", $page, $cek);

$tv_link=''.$cek[1].''.$tv.'/index.m3u8';

<script src="//jwpsrv.com/library/xxxxxXxxxxx.js"></script>
<div id="player"></div>
<script type="text/javascript">
jwplayer("player").setup({
width: "100%",
file: "'.$tv_link.'", 
autostart: "true",
primary: "html5",
androidhls: "true",
skin: "vapor",
androidhls:"true",
aspectratio: "16:9",
primary: "flash",
ga: "{}",
sharing: "{}"
});
</script>
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • loading...
×
×
  • Create New...