Son hali şu şekilde oldu full veriyi çektim ama istediğim yere aktaramadım.

bu kodlarla ilk önce settings.xml den gelen bütün veri ekleniyor sonra uzakadresten aldığım veri ekleniyor.

localden çektiğim veririn signed yazan yere eklenmesini istiyorum.

Not: içerik gizlenmiştir.



<?php
header("Content-Type: audio/x-mpequrl");
header('Content-disposition: attachment;filename="germany.txt"');
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://localhost/settings.xml");
$site = curl_exec($ch);
curl_close ($ch);
preg_match('/signed":"(.*)"/', $site, $icerik);
$signed=$icerik[1];
$file = file_get_contents('http://uzakadres/live/index?link=');
$array = explode("\n", $file);
echo "#test";
for($i=1;$i<count($array);$i++){
if (strpos( $array[$i], 'Germany') !== false) {
echo "\n";
echo "#test\n";
echo $array[$i];
echo "\n".$array[$i+1]."?link=".$signed;
}
}
?>