in reply to logging ftp log into mysql db...
The other solutions are good, but your pseudocode suggests that you're looking for the functions seek() and tell(). Augmenting your pseudocode a little:
--roboticusif new file { # read all lines and insert into db. # Save current position for next time... $current_line = tell(FH); } else if not new file { # Go to current line seek(FH,0,$current_line); # read all new lines and insert into db # Save position for next iteration... $current_line = tell(FH); }
|
|---|