I would like to ask PHP how to execute large quantities of json data.

to do another thing now, you need to use the curl function of PHP to read the data from an json data, and then loop to the curl to grab the data.

this itself is not very simple, but the current problem is that the amount of json data is too large [about 100,000] to grab data at a time, manually copy 20-30 data from large json data at a time, and then execute curl,. But think about the amount of more than 100,000 data, think carefully.

the general idea is whether you can read 20 data sequentially at a time, and then execute, perform the Nth stop, or execute the first 20 data each time, and delete the data after execution.

json data is very simple. The following is just a simple example, which is actually

in English.
"11111","22222","33333","44444","55555","66666"

to put it simply, the above json adds a URL loop curl crawling. For example:
http://xxoo.com/id/11111
http://xxoo.com/id/22222
http://xxoo.com/id/33333
.
cannot be crawled in large quantities because it is a virtual host. So consider grabbing 20-30 at a time, adding up to grab more than a hundred thousand data

.
Php
Mar.18,2021

in fact, JSON is not suitable for dealing with particularly large amounts of data, because it requires very strict data structures. So the first step you should consider is whether you can use file structures such as CSV without JSON,.

if you have to use JSON, you may have to write your own parser. The idea is to read a few bytes and then parse out what you want, and so on. You have to ignore some structures, because JSON requires only one root, so the outermost structure is likely to be ignored. Then parse the data you want according to your prediction of the file structure.


jsonjson20-30curl

stop here. If the amount of JSON data is too large, is the amount of data executed each time is too large or is it just so large at a time? Besides, you can't catch it all at once. What is it? Manual? In addition, CURL can be executed in parallel. Well, I don't really know what I'm talking about

. The yield of

php can achieve the functions desired by the landlord.
reference blog, read a lot of content at once
https://blog.csdn.net/s371795.

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3e16d-2c3df.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3e16d-2c3df.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?