SitePoint Sponsor

User Tag List

Page 2 of 2 FirstFirst 12
Results 26 to 29 of 29
  1. #26
    SitePoint Zealot
    Join Date
    Sep 2010
    Posts
    112
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question

    Quote Originally Posted by paul_paisley View Post
    sorry Kalon i was silly. i have the result in the file created. You are great. Many thanks. let me give you break for now. I remain greatful to this forum
    Regards

    Paul
    Hello Guys,

    Now I have a php script that is able to accept multiple text files, extract what I specify and write all of it in one text file as only $GPGGA or $GPRMC. I now need some suggestions from you all on my next step which is this.

    Since you have followed me closely, I hope you would understand me and I beg you reason with me.

    The background of my question is this: I have a Wampserver dev. environment which has a mysql database that will hold the data extracted from the text files. This data extraction from the text files seem to be an intermediary process since it may not be wise to store raw data or mixed data in the database. The data extracted is still in incomplete as I need to compare certain rows in one text file with another row in another textfile
    It is my wish to automate this process so that the system can enable a user to upload files and using the php extraction script, to extract the strings of lines and write to a file. I am thinking about desigining a web interface to upload the files. Now, when this files are uploaded I aim to use the php script to extract what i want from the files. After extracting, I would like to make the comparison of the rows of data extracted between files. I do not know the best and easiest way to handle this matter I mean automating the whole process. This is where I need some advice. I was handling this whole thing in excel but excel is slow and performs bad with textfile of more 30k rows and still requiring some manual process intermittently. Is this a data mining problem that requires data mining tools? or can I achieve what I want with my wampserver dev. environment. I need your expert opinion. Please I would clarify any of your misunderstanding if you please get back to me.

    Thank you very much.
    Best Regards
    Paul

  2. #27
    Non-Member Kalon's Avatar
    Join Date
    Aug 2010
    Location
    At my computer
    Posts
    2,012
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    After extracting, I would like to make the comparison of the rows of data extracted between files. I do not know the best and easiest way to handle this matter I mean automating the whole process.
    Up to this point - no problem.

    You can upload as many files as you like (within fixed limitations of server disk space etc) using a html form to input the files you want to upload.

    You can then extract lines of data from the uploaded files as described earlier in this thread.

    Now I am getting a little confused about the above quote.

    It would help if you could provide a more detailed description of how you want to compare "rows of data extracted between files".

    Unless you want to do something really unusual I'm pretty sure it could be done in PHP.

    After the data is compared/filtered, it should be straight forward to put it into a database.

  3. #28
    SitePoint Zealot
    Join Date
    Sep 2010
    Posts
    112
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Kalon View Post
    Up to this point - no problem.

    You can upload as many files as you like (within fixed limitations of server disk space etc) using a html form to input the files you want to upload.

    You can then extract lines of data from the uploaded files as described earlier in this thread.

    Now I am getting a little confused about the above quote.

    It would help if you could provide a more detailed description of how you want to compare "rows of data extracted between files".

    Unless you want to do something really unusual I'm pretty sure it could be done in PHP.

    After the data is compared/filtered, it should be straight forward to put it into a database.

    hi there,
    The quote was not intentional. It was a mistake please ignore it. I do reply with quotes to keep heads fresh about the last post.

    I would tell you about the data am comparing shortly but now I do not want to upload the files I would be extracting data from only to store them in the server as the files are originating from me. I want to be able to upload the file and do the extraction straight. I need an idea of how to collect these uploaded files and pass them to my php script without storing them to the server. What I would want in the server is only the extracted files which the php script would write to text files created in the server. Is this any clearer ?

  4. #29
    Non-Member Kalon's Avatar
    Join Date
    Aug 2010
    Location
    At my computer
    Posts
    2,012
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by paul_paisley View Post
    Is this any clearer ?
    Sort of ??

    I'm not sure what you mean here though -

    ....how to collect these uploaded files and pass them to my php script without storing them to the server
    I assume you mean the source files will at some stage be uploaded onto the server (otherwise I don't know how you can extract data from them) and then they will be automatically deleted after the data has been extracted and written to output files.

    If that is what you mean then no problem - the source files can be deleted using unlink().

    If the source files will have the same name every time you run the script, you can hard-code the source file names into the extraction script as per earlier demo or you can use a combination of opendir() and readdir() to get the source file names into the extraction script.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •