Let me explain the scenario: I have a table with around 1 million records. Records are hyperlinks of some remote webpages. I need to create a php page say work.php which will take each link from the table and visit those links using commands like file_get_contents and send the response to one email id. I need the best way to code work.php.
I tried retreiving the entire links from db and parsing each row using a while loop. inside the while loop i will use file_get_contents to fetch response and then send mail. it is showing timeout as there are million records.
Please give me the best optimized code. Any help is appreciated. Thanks