I want to collect news titles and URLs on a website. What should I do? I want to build a school Portal with news from the school's news network. How can I collect news titles and links of news networks in another portal? Does it need to be collected once a day or will it automatically collect the latest content? Please refer to the following link for more information: Beginner. I have never touched the collection process ~~
Reply to discussion (solution)
What is this collection? Read from the database.
If you want to update the latest content at any time, you must read the latest data analysis on time.
Use file_get_content to get the content of the website you want to collect. the regular expression matches the content you want, and you can just import the content to the database.
What is this collection? Read from the database.
I am only doing a test and cannot obtain the corresponding database information ~~
Generally, the news list on the portal is arranged by time, which can be collected every day and the first few latest updates can be collected. Write a scheduled task, which is collected once or N times a day.
Ecshop has a task scheduler function. you can refer to it.