Deleting lines in a txt file

Discussion in 'PHP' started by pzn, May 29, 2006.

  1. #1
    My text file is proxies.txt

    
    xxx.xxx.xx.x:xxxx ONLINE
    xxx.xxx.xx.x:xxxx OFFLINE
    
    Code (markup):
    The text file will look something like that but have a lot more results.

    So far I don't really have anything

    
    <?php
    $handle = fopen("proxies.txt", "a");
    
    
    
    fclose($handle);
    exit;
    ?>
    
    PHP:
    I want it to read everything in the txt file and delete the lines with "OFFLINE", not just the text, but the whole line. Hope you guys can help me
     
    pzn, May 29, 2006 IP
  2. pzn

    pzn Active Member

    Messages:
    575
    Likes Received:
    42
    Best Answers:
    0
    Trophy Points:
    70
    #2
    Nevermind got it!
     
    pzn, May 29, 2006 IP
  3. wisdomseun

    wisdomseun Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Please share your solution, I'm having similar problem
     
    wisdomseun, Sep 22, 2006 IP