• 27-03-2019, 09:51:35
    #1
    1 adet settings.xml dosyası var.

    <settings version="2"><setting id="signed">buradakiveriyicekecegiz</setting>
    </settings>



    simplexml_load_file("settings.xml") ile nasıl bir kod yazmam gerekiyor?

    Teşekkürler..
  • 27-03-2019, 10:32:38
    #2
    Üyeliği durduruldu
    exlance adlı üyeden alıntı: mesajı görüntüle
    1 adet settings.xml dosyası var.

    <settings version="2"><setting id="signed">buradakiveriyicekecegiz</setting>
    </settings>



    simplexml_load_file("settings.xml") ile nasıl bir kod yazmam gerekiyor?

    Teşekkürler..
    <?php
    $data = simplexml_load_file('settings.xml');
    echo $data->settings->setting;
    ?>
  • 27-03-2019, 11:26:00
    #3
    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;
    }
    }
    ?>
  • 27-03-2019, 12:20:22
    #4
    Üyeliği durduruldu
    exlance adlı üyeden alıntı: mesajı görüntüle
    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 "#testn";
    echo $array[$i];
    echo "n".$array[$i+1]."?link=".$signed;
    }
    }
    ?>

    Kısıtlı içerikle malesef daha fazla yardımcı olamıyorum.