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