-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathfake.php
49 lines (32 loc) · 866 Bytes
/
fake.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
include('config.php');
include('header.php');
require_once 'Faker/src/autoload.php';
$faker = Faker\Factory::create();
$i = 1;
do{
$user = R::dispense('user');
$user->fullname = $faker->name;
$user->email = $faker->email;
$user->password = $faker->username;
$user->twitter_name = $faker->username;
$user->bio = $faker->text;
$user->image = '';
$uid = R::store($user);
$j = 1;
do{
$tweets = R::dispense('tweets');
$tweets->userid = $uid;
$tweets->tweets = $faker->text;
R::store($tweets);
}
while($j++ < 1);
}
while($i++ < 10);
$following = R::dispense('following');
$following->userid = 1;
$following->follows = 2;
$id = R::store($following);
echo '<div class="container"><h3>Tadaa !! Fake Data Generated.</h3></div>';
include('footer.php');
?>