Originally Posted by djr33
Clearing the text file is really easy.
$textfile = "";
Assuming you have used fopen() to set $textfile to the file, and such.
[Also, depending on the method used to open the file (w+/a/etc., I can't remember what's what at the moment), you might be just adding "" to it, not setting it to that, but it's possible.]
If you wish to remove a specific line from the text file, then you would do basically the same, but do this instead:
Assume $textfile is the contents of the .txt, again.
str_replace($link,"",$textfile);
Here's how it works: str_replace(FIND, REPLACE, IN_THIS);
You may also want to use something like
str_replace($link."\n","",$textfile);
That would replace the link, then the line break after it.
Hope this helps.