View Single Post
  #10 (permalink)  
Old 18-10-2007, 11:04 AM
LeadMagnet's Avatar
LeadMagnet LeadMagnet is online now
Mr. Tambourine Man
 
Join Date: Jun 2007
Location: Ireland
Gender: Male
Posts: 1,565
Default

Yes, you use file to load that php file into an array.
The first and last entries in the array are your php opening and closing tags so you ignore those and rewrite them at the end.
PHP Code:
$passarray=fopen("names.txt","w+");
array_pop($passarray);
array_shift($passarray);
//your array no longer contains the php tags
// Add or remove your logins to/from the $passarray array right here.

foreach ($passarray as $line) {
fwrite($passarray$passarray);
}
fclose($passarray); 
er... i think i might have gotten that fwrite part wrong, doesn't look right. I dunno, i haven't tested it.
But try that out.
__________________
Subtlety is my middle name... and first and last in case you didn't get the point.
Reply With Quote