Ver Mensaje Individual
  #6 (permalink)  
Antiguo 27/11/2005, 03:11
Operadormail
 
Fecha de Ingreso: junio-2003
Mensajes: 778
Antigüedad: 20 años, 10 meses
Puntos: 1
He probado a "dormir" el script durante 5 segundos cada 150 envios y a extender el tiempo de ejecucion del script 15000 segundos, pero el servidor me da una página en blanco...

Este es el código:


/*INICIALIZADO $CONTADOR A 1*/
$contador=1;
while ($emails=mysql_fetch_array($r_consulta)){
/* AMPLIAMOS EL LÍMIETE DE EJECUCION DEL SCRIPT A 15000 SEGUNDOS*/
set_time_limit(15000);
$destino =$emails["Email"];
$asunto = "Boletin";

// Mando encabezado en html
$encabezado = "MIME-Version: 1.0 \n";
$encabezado .= "Content-type: text/html; charset=iso-8859-1\n";
$encabezado .= "From: Servidor <[email protected]>\n";
$encabezado .= "X-Mailer:PHP/".phpversion()."\n";

if(mail($destino, $asunto, $boletin, $encabezado)){

echo "<p> \n";
echo "<p> \n";
echo "<p> \n";
}
/* SI CONTADOR ES DIVISIBLE (RESTO 0) POR 150 HACEMOS UNA PAUSA DE 4 SEGUNDOS PARA NO SATURAR SERVIDOR*/
if (($contador % 150) == 0) {
sleep(4);}
$contador++;
}


echo "<p>&nbsp;<p><font size='2' face='Arial'>El envio se ha realizado correctamente.</font>";
echo "<p>&nbsp;<p><font size='2' face='Arial'>Se han enviado ".$filas." </font>";



Ademas cuando no me devuelve una pagina en blanco me de este error:

OK

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.



Ayuda please

Última edición por Operadormail; 27/11/2005 a las 10:29