Hello alliedmoders

,
As what i typed in the title, iam try to remove line from the file.
I created a vip system and i want to add option for remove who has date expired and i have searched for how to do that and found some ways and i used one that recommend by
HamletEagle but i got an issue and don't know how to fix it
PHP Code:
RemoveExpired( const szIdentity[ ] )
{
new const szTempFileName[ ] = "tempfile.ini";
new szFormat[ 128 ], szData[ 192 ], szIdentity2[ MAX_NAME_LENGTH ];
new szTempFilePath[ 64 ];
formatex( szTempFilePath, charsmax( szTempFilePath ), "%s/%s", g_szConfigs, szTempFileName );
formatex( szFormat, charsmax( szFormat ), "%s/%s", g_szConfigs, g_iAccountFile );
new iFilePointer = fopen( szFormat, "rt" );
if( iFilePointer )
{
new iInputFilePointer = fopen( szTempFilePath, "wt" )
if( iInputFilePointer )
{
while( fgets( iFilePointer, szData, charsmax( szData ) ) )
{
if( szData[ 0 ] != EOS )
{
parse( szData, szIdentity2, charsmax( szIdentity2 ) );
trim( szIdentity2 );
if( !equali( szIdentity, szIdentity2 ) )
{
fprintf( iInputFilePointer, szData );
}
}
}
fclose( iInputFilePointer );
fclose( iFilePointer );
delete_file( szFormat );
rename_file( szTempFilePath, szFormat, 1 );
}
}
return 0;
}
After creating the new file with remove the line of the user who expired the file does not deleted or renamed
Another question: Is it possible to do that by using "TrieDeleteKey" ?
__________________