php: la forma más rápida de verificar la presencia de texto en muchos dominios (por encima de 1000)

Tengo un script php ejecutando y usando cURL para recuperar el contenido de las páginas web en las que me gustaría verificar la presencia de algún texto.

En este momento se ve así:

for( $i = 0; $i < $num_target; $i++ ) {
    $ch = curl_init();
    $timeout = 10;
    curl_setopt ($ch, CURLOPT_URL,$target[$i]);
    curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt ($ch, CURLOPT_FORBID_REUSE, true);
    curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
    $url = curl_exec ($ch);
    curl_close($ch);

    if (preg_match($text,$url,$match)) {
        $match[$i] = $match;
        echo "text" . $text . " found in URL: " . $url . ": " . $match .;

        } else {
        $match[$i] = $match;
        echo "text" . $text . " not found in URL: " . $url . ": no match";
        }
}

Me preguntaba si podría usar una configuración de CURL especial que la haga más rápida (busqué en el manual de php, elegí las opciones que me parecieron mejores, pero quizás haya descuidado algunas que podrían aumentar la velocidad y el rendimiento del script).

Entonces me preguntaba si el uso de cgi, Perl o python (u otra solución) podría ser más rápido que php.

Gracias de antemano por cualquier ayuda / consejo / sugerencia.

Respuestas a la pregunta(1)

Su respuesta a la pregunta