<?php
set_time_limit(0);

    while (ob_get_level()) ob_end_clean();
    header('Connection: close');
    ignore_user_abort();
    ob_start();
    
    $size = ob_get_length();
    header("Content-Length: $size");
    header('Connection: close');
    ob_end_flush();
    flush();
    
$a = file("SITIOS.txt", FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES);

foreach($a as $sitio){
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, "http://localhost/WooCommerce/wooindex.php?site=".$sitio);
curl_setopt($curl, CURLOPT_HEADER, 0);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($curl, CURLOPT_TIMEOUT, 180);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
echo time(). " => ".curl_exec($curl).PHP_EOL;

}