Answer the question
In order to leave comments, you need to log in
What language to parse in?
Hello. Help please with the decision of a question. It all started with the fact that I wrote a simple php parser. There was a need for the parser to work when the button is clicked. Connected ajax, which sends a request to parser.php. I wanted to make it so that the page displayed how much data was processed and left, but I realized that in this case this would not work, because. the answer comes at the end of the execution of all php code. Then I decided to send one request to ajax, so that php processes one at a time, so it became possible to display on the page how many have already been processed. And now the question has become: why, in this case, use php if you send a request and ask for the data I need, maybe javascript itself. Please tell me the smartest way to implement this.
Answer the question
In order to leave comments, you need to log in
Let parser.php write data (how much data is processed and how much data is left) to result.json as it works. On the client, just periodically request result.json every N seconds.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question