Hi guest,
Do you mean extracting the IP addresses only and saving them to the same file?
You could use file() to open the file into an array.
Then open the file for writing only with fopen().
Cycle through the array. On every step, use explode() and trim(), or strpos() and substr() to extract the IP address from each element of the array, and fwrite() it back to the original file.
Paul.