mindtpi99 Posted February 13, 2008 Posted February 13, 2008 Hi I'm looking for advise. I need to read from an access log, get the result (which is tab-delimited text) and write each line as a separate record in a database. It's a constantly changing file so it'd need to read from it constantly and retrieve any new entries What's the best way to achieve this? PHP? Built-in FM function? 3rd party plugin? Is Filemaker the best way to do it, should I use PHP/MySQL instead? If anyone has any advise/tips it'd be greatly appreciated
Fenton Posted February 13, 2008 Posted February 13, 2008 We need more info. Because you can import a tab-delimited, return-separated file into FileMaker with no problem. So one assumes there are other considerations. If you are concerned with overlap, and the file is not too large, you could import it into a temporary table (or file), then use a method to determine what was new. If the file is large, and continually added to, yet sometimes dropping earlier entries (like many log files), then you might consider using more complex methods, using Mac command line tools, such as grep, and/or tail, to read only the last portion (which you didn't already have, write that to another text file, and import it. You can run Mac command line via AppleScript (in a FileMaker Perform AppleScript step), or directly via the (free) plug-in zippShell. I tend to use AppleScript to run them, so I can also use regular AppleScript commands, variables, etc.. I'm not much of a Unix geek. Is there a timestamp in each log line? That would certainly help.
Recommended Posts
This topic is 6467 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now