Home >Backend Development >PHP Tutorial >How to synchronize lottery results
I want to develop an application to know the lottery results
How should I obtain this result? Is it better to crawl data from other websites myself or use API?
How to synchronize the lottery time? For example, if there is a countdown timer and lottery draw How can we better implement the synchronized countdown? Thank you, Master
How should I obtain this result? Is it better to crawl data from other websites myself or use API?
How to synchronize the lottery time? For example, if there is a countdown timer and lottery draw How can we better implement the synchronized countdown? Thank you, Master
The simple method is that when each user visits you make a judgment whether it is time to generate new data. If there is no data when the time is up, run the relevant function once to save the data into the database. Then there will be data in the database. After that, you don’t have to catch the users who come to visit. Of course, you also need to have a simple mechanism to remove duplicates.
As for whether to crawl or directly API, it doesn’t seem to be troublesome. You can check whether websites such as aggregated data have similar interfaces.