-
Notifications
You must be signed in to change notification settings - Fork 2
/
nepalilorem.php
61 lines (56 loc) · 1.28 KB
/
nepalilorem.php
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?php
// for ($i=0; $i<54 ; $i++) {
// # code...
// $c= dechex((hexdec('0x904')+$i));
// $a = '&#x'.$c.";<br>";
// echo $c."=".$a;
// }
// echo "ई";
// echo "ऄ";
// echo "�";
// 0914
// 0000100100010100
// 11100000 10100100 10010100
// E0 A4 94
// $aa_word = 17;
// for ($i=0; $i <400 ; $i++) {
// # code...
// $main_letter = rand(0,53);
// $letter_attr = rand(0,21);
// if($main_letter<17){
// $a = '&#x'.dechex((hexdec('0x904')+$main_letter)).";";
// }
// else {
// $a = '&#x'.dechex((hexdec('0x904')+$main_letter)).";&#x".dechex((hexdec('0x93A')+$letter_attr)).";";
// }
// echo " ".$a;
// }
function makeLetter()
{
$aa_word = 17;
$main_letter = rand(0,53);
$letter_attr = rand(0,21);
if($main_letter<17){
$a = '&#x'.dechex((hexdec('0x904')+$main_letter)).";";
}
else {
$a = '&#x'.dechex((hexdec('0x904')+$main_letter)).";&#x".dechex((hexdec('0x93A')+$letter_attr)).";";
}
return $a;
}
function makeWords(){
$word_letter_count = rand(1,7);
$letterss = '';
for ($i=0; $i <$word_letter_count ; $i++) {
$letterss .= makeLetter();
}
return $letterss;
}
for ($j=0; $j <5 ; $j++) {
$para_word_count = rand(3,10);
$words = '';
for ($i=0; $i <$para_word_count ; $i++) {
$words .= ' '.makeWords();
}
echo $words."।";
}