Hi, I have a list of links to scripts that need to be run as a queue. And I'm looking for a solution to do this. I know that is might sound pretty simple but I'm a pretty big greenhorn when it comes to this. So here's how it needs to be done... Execute http://www.link1.com [pause 5 mins] Execute http://www.link2.com [pause 5 mins] Execute http://www.link3.com etc... I know this probably isn't the best way to do it... but that's how it was set up. There are a couple hundred urls that need to be executed... So I'd hate to have to write up a script and code all of them in by hand. Is there a solution that I could drop in a list of URLs set a time between to execute them then let it run? Thanks
<?php set_time_limit(0); $links = file('links.txt'); foreach ($links AS $link) { file_get_contents(trim($link)); sleep(300); } ?> PHP: If PHP is okay for you. This script expects that there's only one URL in each line of the text file.
That basically means you are trying to access pages located in a password protected directory. If you are not, try to contact your hosting support and ask them about this. If you do put the pages in password protected folder, there are 2 solutions: 1. You put them in a non protected folder. If you are unwilling, then... 2. You read them via CURL function of PHP (confirm your hosting whether they support CURL for PHP). Then search Google for CURL usage. Not really complicated if your protection system is simple.