I’m making a website on which administrators can upload some PDF files. I have some code that converts the uploaded PDF file (given as parameter) to plain text and, with that plain text, I can make some inserts in a database that is used to generate other pages on the website.
I could redirect the administrator that uploaded a file to another page, and on that page I could put the code to parse the file and create the database entries, but that is a slow operation and the administrator would have to stay on that page until the action completes.
Maybe I don’t have the best solution, but here’s how I thought it should be done: in the upload page, after a file is uploaded, the server should run a file (ex.: parsePDFFile.php) that would take care of parsing the PDF file and updating the database. That way, the administrator could keep browsing the site without being aware that there’s some file processing behind the scenes.
The problem is I have no idea where to start or what to search for on Google, so I don’t know if doing something like this is even possible or a good solution.
When you upload file. that time also enter pdf file name in database and make status not converted in webpage. once the Cronjob will run that time code will change PDF status COMPLETED. Cronjob will run every hours so site will update continues. so the server will not have much load