Fetching multiple URLs and updating DB with PHP script
<p>I have a website that uses MySQL. I am using a table named "People" that each row represents, obviously, a person. When a user enters a page I would like to introduce news related to that person (along with the information from the MySQL table). For that purpose, I decided to use BING News Source API.</p>

<p>The problem with the method of calling the BING API for each page load is that I am increasing the load time of my page (round tip to BING servers). Therefore, I have decided to pre-fetch all the news and save them in my table under a coloumn named "News".</p>

<p>Since my table contains 5,000+ people, running a PHP script to download all news for every person and update the table at once results a <code>Fatal error: Maximum execution time</code> (I would not like to disable the timeout, since it is a good security measure).</p>

<p>What will be a good and efficient way to run such a script? I know I can run a cron job every 5 minutes that will update only a portion of rows everytime - but even in that case - what will be the best way to save the current offset? Should i save the offset in MySQL, or as a server var?</p>
