1<?php
2
3echo "Continue? (Y/N) - ";
4
5$stdin = fopen('php://stdin', 'r');
6$response = fgetc($stdin);
7if ($response != 'Y') {
8 echo "Aborted.\n";
9 exit;
10}
11
12$seconds = 5;
13
14for ($i = $seconds; $i > 0; --$i) {
15 echo $i;
16 usleep(250000);
17 echo '.';
18 usleep(250000);
19 echo '.';
20 usleep(250000);
21 echo '.';
22 usleep(250000);
23}
24
25echo " Running NOW\n";
26// run command here
27