• 26-03-2019, 00:02:42
    #1
    Üyeliği durduruldu
    tedarikçi firmamızda bulunan duyuru.txt var bu duyurular alt alta txt olarak kayıt ediliyor.

    ben bunu kendi websayfamda kayan yazı olarak bütün satırları oradan çekmek istiyorum mümkün mü?
  • 26-03-2019, 00:05:51
    #2
    evet hocam mumkundur. php newline txt read olarak aratirsaniz istediginiz sonucu bulursunuz
  • 26-03-2019, 00:07:48
    #3
    Üyeliği durduruldu
    burakonline95 adlı üyeden alıntı: mesajı görüntüle
    evet hocam mumkundur. php newline txt read olarak aratirsaniz istediginiz sonucu bulursunuz
    Bilginiz varsa burada paylaşsanız ve herkes faydalansa hocam. Yabancı kaynakları araştırdım ama çözüme ulaşamadım.
  • 26-03-2019, 00:13:42
    #4
    https://stackoverflow.com/questions/...-file-with-php

    <?php $fh = fopen('filename.txt','r');while ($line = fgets($fh)) {  // Okunan satır  // echo($line);}fclose($fh);?>
    Burada ki $line değişkenini bir string'e atarak aşağıdaki JS kodu ile kayma efekti verebilirsiniz.
    https://www.jqueryscript.net/demo/Te...Query-Marquee/
  • 26-03-2019, 00:14:15
    #5
    $handle = fopen("http://adres.com/duyuru.txt", "r");
    if ($handle) {
    while (($line = fgets($handle)) !== false)
    {
    echo $line . "</br>";
    }
    }
    fclose($handle);

    yukaridaki kod ile txtdeki satirlari tek tek okur ve ekrana satir satir yazabilirsiniz.
  • 26-03-2019, 00:25:07
    #6
    Üyeliği durduruldu
    caneralcilioglu adlı üyeden alıntı: mesajı görüntüle
    https://stackoverflow.com/questions/...-file-with-php

    <?php $fh = fopen('filename.txt','r');while ($line = fgets($fh)) {  // Okunan satır  // echo($line);}fclose($fh);?>
    Burada ki $line değişkenini bir string'e atarak aşağıdaki JS kodu ile kayma efekti verebilirsiniz.
    https://www.jqueryscript.net/demo/Te...Query-Marquee/
    Parse error: syntax error, unexpected end of file in

    hatası alıyorum txt dosyasını uzaktan cekiyorum
  • 26-03-2019, 00:28:55
    #7
    <?php
    $content = explode("n", file_get_contents("duyuru.txt"));
    $content = implode(" | ", $content);
    echo "<marquee>{$content}</marquee>";
    ?>
  • 26-03-2019, 00:29:05
    #8
    Üyeliği durduruldu
    burakonline95 adlı üyeden alıntı: mesajı görüntüle
    $handle = fopen("http://adres.com/duyuru.txt", "r");
    if ($handle) {
    while (($line = fgets($handle)) !== false)
    {
    echo $line . "</br>";
    }
    }
    fclose($handle);

    yukaridaki kod ile txtdeki satirlari tek tek okur ve ekrana satir satir yazabilirsiniz.
    Warning: fopen(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in

    Warning: fopen(https://www.xxx.com/duyuru.txt): failed to open stream: Invalid argument in lunox.php on line 87


    Warning: fclose() expects parameter 1 to be resource, boolean given in lunox.php on line 94

    bu koddan başka kod yok.
  • 26-03-2019, 00:33:59
    #9
    $handle = fopen("http://adres.com/duyuru.txt", "r");
    $icerik = stream_get_contents($handle);
    if ($handle) {
    while (($line = fgets($icerik)) !== false)
    {
    echo $line . "</br>";
    }
    }
    fclose($handle);

    boyle deneyin hocam