Hi i am looking for a simple php script that can execute for exp 10 site url's from a list then sleep 1 minute and execute another 10 urls.. and like this again and again. Can someone give me a direction or can help me with a code?
You're not very clear on this one, but the simplest way of simply requesting a URL is using file_get_contents. You're also looking for a loop to loop through an array of URLs. Pick your favorite for this one, I'll use foreach. Finally you need the sleep function.
Untested code:
$urls = array(
'http://google.com',
'http://yahoo.com',
'http://bing.com');
foreach($urls as $url)
{
//Make a request.
$url_content = file_get_contents($url);
/*
* Do something with the content here.
*/
//Wait a few moments.
sleep(60); // Seconds.
}
For more flexibility you need to look into curl which supports, among other things, POST requests and messing with headers.