• 16-11-2021, 14:11:22
    #1
    Merhaba, bir radyoya ait song history verisini çekmeye çalışıyorum, yıllar önce kullandığım bir kod dizini var elimde ancak şuan çalışmıyor. Kodlarda bir hata var mı anlayamadım yardımcı olabilir misiniz

    <?php
    //* ---------- General configuration ---------- */
    
    $station_name = "Station Name";
    
    $refresh = "60"; // Page refresh time in seconds. Put 0 for no refresh
    $timeout = "1"; // Number of seconds before connecton times out - a higher value will slow the page down if any servers are offline
    
    //* ----------- ---------- */
    
    
    if ($refresh != "0")
    {
    print "<meta http-equiv=\"refresh\" content=\"$refresh\">\n";
    }
    print "<title>$station_name SHOUTcast Stats</title>\n";
    ?>
    <?php
    // user-configurable var: Shoutcast server URL
    $shoutcast_url = 'http://51.77.72.72:6167';
    
    error_reporting(0);
    ini_set('user_agent', 'Mozilla');
    header('Content-type: text/plain; charset=utf-8');
    $html = file_get_contents(rtrim($shoutcast_url, '/').'/played.html');
    
    $dom = new domDocument;
    $dom->loadHTML($html);
    $tables = $dom->getElementsByTagName('table');
    $rows = $tables->item(2)->getElementsByTagName('tr');
    
    foreach($rows as $row)
    {
    $cols = $row->getElementsByTagName('td');
    
    if(!strstr($cols->item(0)->nodeValue,'@'))
    {
    echo $cols->item(0)->nodeValue . ': ';
    echo $cols->item(1)->nodeValue;
    
    if($cols->item(2)->nodeValue)
    echo '*'.$cols->item(2)->nodeValue.'*';
    
    echo "\n";
    }
    }
    ?>
  • 16-11-2021, 14:16:06
    #2
    mrdeejay adlı üyeden alıntı: mesajı görüntüle
    Merhaba, bir radyoya ait song history verisini çekmeye çalışıyorum, yıllar önce kullandığım bir kod dizini var elimde ancak şuan çalışmıyor. Kodlarda bir hata var mı anlayamadım yardımcı olabilir misiniz

    <?php
    //* ---------- General configuration ---------- */
    
    $station_name = "Station Name";
    
    $refresh = "60"; // Page refresh time in seconds. Put 0 for no refresh
    $timeout = "1"; // Number of seconds before connecton times out - a higher value will slow the page down if any servers are offline
    
    //* ----------- ---------- */
    
    
    if ($refresh != "0")
    {
    print "<meta http-equiv=\"refresh\" content=\"$refresh\">\n";
    }
    print "<title>$station_name SHOUTcast Stats</title>\n";
    ?>
    <?php
    // user-configurable var: Shoutcast server URL
    $shoutcast_url = 'https://51.77.72.72:6167';
    
    error_reporting(0);
    ini_set('user_agent', 'Mozilla');
    header('Content-type: text/plain; charset=utf-8');
    $html = file_get_contents(rtrim($shoutcast_url, '/').'/played.html');
    
    $dom = new domDocument;
    $dom->loadHTML($html);
    $tables = $dom->getElementsByTagName('table');
    $rows = $tables->item(2)->getElementsByTagName('tr');
    
    foreach($rows as $row)
    {
    $cols = $row->getElementsByTagName('td');
    
    if(!strstr($cols->item(0)->nodeValue,'@'))
    {
    echo $cols->item(0)->nodeValue . ': ';
    echo $cols->item(1)->nodeValue;
    
    if($cols->item(2)->nodeValue)
    echo '*'.$cols->item(2)->nodeValue.'*';
    
    echo "\n";
    }
    }
    ?>

    Sunucu pasif olabilir mi ?

    https://51.77.72.72:6167/played.html yapınca bir sayfa açılmadı veri çekilebilecek.
  • 16-11-2021, 14:17:05
    #3
    Programmer adlı üyeden alıntı: mesajı görüntüle
    Sunucu pasif olabilir mi ?

    https://51.77.72.72:6167/played.html yapınca bir sayfa açılmadı veri çekilebilecek.
    Server Aktifte ssl'den dolayı açmamıştır bu adrestende deneyebilirsiniz https://feelo.80.yayin.com.tr/played.html
  • 17-11-2021, 16:36:28
    #4
    Kodu deneyebilcek varsa makbule geçer acaba benim hostingden kaynaklı bir sorun mu diye de düşünmeye başladım
  • 17-11-2021, 20:44:44
    #5
    fatbotter.com
    mrdeejay adlı üyeden alıntı: mesajı görüntüle
    Kodu deneyebilcek varsa makbule geçer acaba benim hostingden kaynaklı bir sorun mu diye de düşünmeye başladım
    Buyrun: https://bebekmarket.com.tr/test.php

    Kodlar: https://bebekmarket.com.tr/kod
  • 17-11-2021, 21:04:41
    #6
    Hocam çok teşekkürler ancak https://bebekmarket.com.tr/kod bu sayfayı anlayamadım
  • 17-11-2021, 21:08:09
    #7
    mrdeejay adlı üyeden alıntı: mesajı görüntüle
    Hocam çok teşekkürler ancak https://bebekmarket.com.tr/kod bu sayfayı anlayamadım
    sen int. hazır kod bulmadıgına emin misin?
    adam herşeyi çekip, çalısacak sekilde kodu yazmış neyini anlayamadin?
  • 17-11-2021, 21:14:57
    #8
    Tartaros adlı üyeden alıntı: mesajı görüntüle
    sen int. hazır kod bulmadıgına emin misin?
    adam herşeyi çekip, çalısacak sekilde kodu yazmış neyini anlayamadin?
    Böyle gözüktüğü için anlamamıştım, kod kaynak kısmındaymış. Sonrasında kodu yazdım yine çalışmadı benim hostta https://www.uni-forum.net/melih/history.php
  • 17-11-2021, 21:16:11
    #9
    mrdeejay adlı üyeden alıntı: mesajı görüntüle
    Böyle gözüktüğü için anlamamıştım, kod kaynak kısmındaymış. Sonrasında kodu yazdım yine çalışmadı benim hostta https://www.uni-forum.net/melih/history.php
    sen aşırı deneme yaptığın için / istek gönderdiğin için senin ip banlamıs olabilirler mi?
    arkadasın yazdıgı kodu direk yapıstırık gönderdinmi? sunucumu var, host mu?