-
Notifications
You must be signed in to change notification settings - Fork 0
/
plain.php
49 lines (49 loc) · 1.38 KB
/
plain.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
<?php
if(!@include(__DIR__.'/Surikat/Loader.php'))
symlink('../Surikat','Surikat')&&include('Surikat/Loader.php');
use Core\Dev;
use Model\ATableMain;
use Model\R;
use Core\Ruler;
use Core\Session;
use Core\HTTP;
use Tool\LoremIpsum;
Dev::on(Dev::PHP);
//Dev::on(Dev::MODEL);
Dev::on(Dev::DB);
//Dev::on(Dev::DBSPEED);
//Dev::on(Dev::SQL);
$it = pow(10,5);
set_time_limit(0);
HTTP::nocacheHeaders();
ob_implicit_flush(true);
Session::start();
@ob_end_flush();
$LP = new LoremIpsum();
$LP->setWords(file(SURIKAT_PATH.'.data/liste.de.mots.francais.frgut.txt',FILE_IGNORE_NEW_LINES));
echo '<html><body></body></html>';
for($i=1;$i<=$it;$i++){
$name = $LP->getText(25);
while(!Ruler::minchar($name,4))
$name = $LP->getText(6);
ATableMain::CREATE('project',[
'title' => trim($LP->getText(15)),
//'presentation' => $LP->getHTML(250),
'presentation' => $LP->getHTML(25),
'sharedTag' => [
'name' => $name
],
'ownGeopoint' => [[
'label' => str_replace([',','.'],'',$LP->getText(1)),
'lat' => rand(-90*1000,90*1000)/1000,
'lon' => rand(-180*1000,180*1000)/1000,
'radius' => rand(5*1000,60*1000)/1000,
]],
'url' => 'http://www.'.strtolower(str_replace([' ',',','--'],'-',$LP->getText(4))).'.com/',
'tel' => rand(10000000000,99999999999),
])->store();
if($i===1)
R::freeze(true);
//echo "$i\n";
echo '<script type="text/javascript">document.body.innerHTML = "'.$i.'";</script>';
}