Merhaba, benzeri işlemi aşağıdaki gibi yapıyorum, sizin kodun altına ekledim.
[code-sh=php]$post = 'pro=170889&RequestType=2';
$url = "https://www.xxx.com.tr/request";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, null);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.87 Safari/537.36");
curl_setopt($ch, CURLOPT_COOKIE, 'PHpseskey=123');
$sonuc = curl_exec ($ch);
$json = json_decode($sonuc , true);
$sonuc = $json['list'];[/vb]
kodu ile sonuc değerini alabilirsin,
veya
[code-sh=php]$string = '{"url":"https://xxx.com.tr","list":[{"token":"Var_uri_with_ticket":"https://xxxx.com/baglanti_yes/slink/s_01/test-audio_tur=96000-video=1800000.m3u8"}],"session_key":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","trm_token":"Bearer ","errCode":"OK","message":null,"ErrorMessage":null,"statusCode":200,"accessToken":null,"isLogin":test}';
preg_match_all('/(baglanti_yes.*m3u8)/',$string, $posts,PREG_SET_ORDER);
foreach ($posts as $thing) {
$link = "https://xxxx.com/" .$thing[1];
echo $link;
//header("Location: $link");
}
[/vb]
kodu ile linki görebilirsin, echoyu iptal edip headeri aktif edersen link açılır.
"Boş Örnek Eklerim, Yapıp Verirler" demeyin, örneğinizi hazırlayın. Komplike kod talebiniz var ise İletişim bağlantısından bize ulaşın. Cebelleşmezsen Öğrenemezsin. Cevapla