I have made a PHP file which checks some words in a list [1000 or more ]. I got the source code from another script.
Example
mysite.com?key=word1
The loop checks every word but the problem is that it does not wait for all the loop it stops after a few minutes.
How can I make it wait to finish all the words in the list?
This is my code:
<?php
$_keywords = $_POST['keys'];
$_keywords = explode ( "\r\n", $_keywords );
foreach($_keywords as $key=>$value){
$k = explode("\t", $value);
$_keywords[$key] = implode(" ", $k);
}
$maxy = count($_keywords)-1 ;
echo 'search start';
for ($iy = 0; $iy <= $maxy; $iy++) {
$miss ="http://mysite/2.php?key=".$_keywords[$iy];
echo $miss."<br>" ;
$page = file_get_contents($miss);
echo $iy .' > '.$_keywords[$iy].' : '. $page ."<br>";
usleep(200000);
}
?>