forked from kokonior/PHP-Projects
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathenc.php
More file actions
29 lines (22 loc) · 630 Bytes
/
enc.php
File metadata and controls
29 lines (22 loc) · 630 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
echo "
1. Encrypt Blank Base
2. Encrypt Blank Quoted
" . PHP_EOL;
echo "Select List : ";
$list = trim(fgets(STDIN));
echo "Encrypt your text here : ";
$text = trim(fgets(STDIN));
if ($list == 1) {
$enc = implode('^',str_split($text));
$str = str_replace('^','##blankquoted'. rand(1,10) . '##',$enc);
echo $str . '##blankbase' . rand(1,10) . '##';
} elseif ($list == 2) {
$enc = implode('^',str_split($text));
$str = str_replace('^','##blankquoted'. rand(1,10) . '##',$enc);
echo $str . '##blankquoted' . rand(1,10) . '##';
} else
{
echo "Wrong Input Menu !!" . PHP_EOL;
exit(1);
}