V
V
Viktor2017-09-26 22:13:56
Laravel
Viktor, 2017-09-26 22:13:56

How to traverse multiple URLs at the same time in PHP?

There is a list of URLs that I am traversing through simplexml_load_url, one by one.
The number of URLs can be around 300-500. Data in XML format is obtained from each URL, parsed and the result is entered into the database.
How can you:
1. Optimize time. It took about 50 seconds to bypass 20 URLs
2. Make it so that all URLs are crawled at the same time, and after all the URLs are parsed, catch this moment in order to record the "update time for everything" in the database.
Tell me, please, what can be used for this?) If it plays a role, then I use Laravel, and I run the bypass script via cron
Thanks in advance!

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question