I'm trying to pull the m3u8 file from a site.
This is the site address.
http://uygulama14.club/token/sinema/beinmoviespremier.php?idd=
The code I use:
<?php
$link = "http://uygulama14.club/token/sinema/beinmoviespremier.php?idd=";
$veri = file_get_contents($link);
preg_match('#m3u8(.*?)"#',$veri,$veritemp);
//echo $veritemp[1];
//print_r($veritemp[1]);
function go ($url, $time = 0){
if ($time) header("Refresh: {$time}; url={$url}");
else header("Location: {$url}");
}
go("http://a.bylig3.com:8081/taraftartv4/beinmoviespremier/playlist.m3u8$veritemp[1]");
?>
Problem: The connection I made is not working properly. It works when you copy and edit it from your site.
{"result":[{"url":"http:\/\/a.bylig3.com:8081\/taraftartv4\/beinmoviespremier\/playlist.m3u8?wmsAuthSign=c2VydmVyX3RpbWU9My8yMi8yMDE5IDU6NTI6NDggQU0maGFzaF92YWx1ZT1PNVRNcS9VUkx6NEp3elFoOG01eUtBPT0mdmFsaWRtaW51dGVzPTIw"}]}
I'm copying the url section from the site. I'm editing the url part in this way and it works
But not working with the preg_match command.