Script:
include_once 'simple_html_dom.php';
$ckfile = 'cookie.txt';
foreach (range('a', 'z') as $letters) {
echo $letters;
}
foreach (range('1', '100') as $numbers) {
echo $numbers;
}
$ch = curl_init ("http://site/test.php?letter=".$letters."&page=".$numbers."");
curl_setopt ($ch, CURLOPT_COOKIEFILE, $ckfile);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$output = curl_exec ($ch);
$html = str_get_html(''.$output.'');
foreach($html->find('a') as $element) {
echo $element->href . '<br>';
}
As you can see there is three arrays seperated, one by one works, but how them ‘put together’ in one foreach and do ‘job’ ?
Etc. I’m not familiar with foreach after all, and if i remember correctly, it’s my second time with ‘them’…
But this script will execute for a few minutes… What do you need it for?