Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 388091
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T15:44:10+00:00 2026-05-12T15:44:10+00:00

For a new import feature for my users, I’m using fgetcsv to read CSV

  • 0

For a new import feature for my users, I’m using fgetcsv to read CSV files generated by social book cataloging sites like LibraryThing and Shelfari and then I run a series of Amazon queries to look up ISBNs from within the files. I want to be able to have users confirm the titles that match certain criteria, then add them to their local bookshelves.

Some of these files will have hundreds or thousands of records and I can’t average more than 1 lookup per second with Amazon. I also want users to confirm we’ve matched their books correctly. I’m thinking that I should process the CSV file in chunks of 10 or 20 records, and display ‘hits’ for users to confirm. But I can’t figure out how to do this effectively.

I can read the CSV file into an array, selecting only ISBNs, for example, and I know I can use a simple loop on the array to test 10 or 20 records against Amazon. But how do I allow the user to accept or reject the batch of records and then review 10 or 20 more without running fgetcsv again on the CSV file with a page reload?

Is there some simple way to allow an array to persist between page loads? Or perhaps I can pause to accept user input within the loop itself

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T15:44:11+00:00Added an answer on May 12, 2026 at 3:44 pm

    Why not just do a ‘delayed’ import method?
    Allow the CSV import, process the data in a ‘temporary storage’ database, and on the backend you lookup ISBN’s via the Amazon process.

    The user will be prompted with a “your records are being processed, you will be asked to review them once we have finished validating”, etc;

    At that point they can go through your listing locally and not be limited by the 1/second ISBN lookup of Amazon. I doubt a user would want to sit there while 10/20 are processed then wait more for the next page, and the next.

    So the process should fold out like so:

    1. User imports data (while on the backend a cronjob/process goes through the records one by one without making the user wait).
    2. User prompted to come back to verify data / User comes back after period of time (is notified etc)
    3. User goes through the list of data and validates it (paginated), upon acceptance you move the accepted/valid entries into your final database (live valid data).
    4. If the user wants to stop @ record 100 of 100,000 you give them that option, and they have this sort of ‘queue’ of validation.

    Hows that sound? A bit more work but seems the best approach for handling large data entries like this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 305k
  • Answers 305k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer This question comes up a lot. The answer is: Yes… May 13, 2026 at 9:01 pm
  • Editorial Team
    Editorial Team added an answer You should have a look at QueueUserWorkItem. This would allow… May 13, 2026 at 9:01 pm
  • Editorial Team
    Editorial Team added an answer You will have to get a "virtual private server" account… May 13, 2026 at 9:01 pm

Related Questions

For a new import feature for my users, I'm using fgetcsv to read CSV
I export my settings in Visual Studio and if I ever move to a
I want to make a tile based game for android. At the moment I
I have a desktop (winforms) application that uses a Firebird database as a data
I have a feature which allows the user to create projects and view it

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.