<?php
$fecha = date("Y-m-d");
$nombre1 = 'calper-cl-home-' . $fecha;
$nombre2 = 'calper-cl-producto-' . $fecha;

shell_exec('sudo lighthouse https://www.calper.cl/trakea-tu-pedido/ --output csv --preset=desktop --locale es  --output-path /var/www/html/lighthouse/calper-cl-trakea-tu-pedido-'.$fecha.'-desktop.csv  --chrome-flags="--no-sandbox --headless --disable-gpu"');

//sentencia desktop
shell_exec('sudo lighthouse https://www.calper.cl/ --output csv --preset=desktop --locale es  --output-path /var/www/html/lighthouse/'.$nombre1.'-desktop.csv  --chrome-flags="--no-sandbox --headless --disable-gpu"');

//sentencia mobile
shell_exec('sudo lighthouse https://www.calper.cl/ --output csv --form-factor mobile --locale es  --output-path /var/www/html/lighthouse/'.$nombre1.'-mobile.csv  --chrome-flags="--no-sandbox --headless --disable-gpu"');

//sentencia desktop
shell_exec('sudo lighthouse https://www.calper.cl/tienda/medical/ --output csv --preset=desktop --locale es  --output-path /var/www/html/lighthouse/'.$nombre2.'-desktop.csv  --chrome-flags="--no-sandbox --headless --disable-gpu"');

//sentencia mobile
shell_exec('sudo lighthouse https://www.calper.cl/tienda/medical/ --output csv --form-factor mobile --locale es  --output-path /var/www/html/lighthouse/'.$nombre2.'-mobile.csv  --chrome-flags="--no-sandbox --headless --disable-gpu"');

?>
