Das ist nicht dein realer Code!

$string = curl_exec(...);
if ($string === FALSE) {
remission();
} else {
verarbeiten();
}
if ([COLOR=#000000][COLOR=#0000cc]$string [/COLOR][COLOR=#006600]=== [/COLOR][COLOR=#0000cc]FALSE) { [/COLOR][/COLOR]
while($num<$this->num){ //durchlauflaenge wird definiert $num->argv
$cur_u = getURL(); //diese funktion liefert die url, die besucht wird
// ist auch etwas umfangreicher, zum verstaendnis reicht es aber wohl so
$ch = curl_init(); //hier werden die cURL "executed"
curl_setopt($ch, CURLOPT_URL, $cur_u);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, $this->user_agent);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, $this->timeout);
curl_setopt($ch, CURLOPT_COOKIEJAR,$this->cookie_file);
curl_setopt($ch, CURLOPT_COOKIEFILE,$this->cookie_file);
curl_setopt($ch, CURLOPT_FRESH_CONNECT, 1);
curl_setopt($ch, CURLOPT_FORBID_REUSE, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_NOPROGRESS, 0);
curl_setopt($ch, CURLOPT_BUFFERSIZE, 9000);
$string = curl_exec($ch);
if($string === FALSE){ //wird auf fehler ueberprueft
print "error";
remission(); setzt den url "maker" um eins zurueck, sodass neu gerufen wird
}
else{
verarbeiten($string); hier wird der string dann weiterverarbeitet
print "fertig und ok";
$num++; //schleife
}
print "sent request to ".$num;
curl_close($ch);
usleep($this->sleep);
}
while ($num < $this->num) {
if (rand(0,1)) {
print "error";
}
else {
print "ok";
$num++;
}
print "sent request to ".$num;
}
Kommentar