Reading first line of data file then erase it

From: Date: Thu, 28 Dec 2000 08:35:21 +0000
Subject: Reading first line of data file then erase it
Groups: php.general 
Request: Send a blank email to php-general+get-32056@lists.php.net to get a copy of this message
I have data file that just contains unused IP address named ipdata it looks like this with one IP address on each line 205.345.345.23 205.345.345.24 205.345.345.25 205.345.345.26 What I what to do is open it get the top IP address then erase that address and close the file. How would I do this. I know that I open it with $fp=fopen("ipdata","r+")or die("unable to open file ($ipdata)");

« previous php.general (#32056) next »